NetTalk Central

Author Topic: Lookup button on readonly string field  (Read 4467 times)

linas@debetas.lt

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
    • Email
Lookup button on readonly string field
« on: October 09, 2011, 03:05:48 PM »
Hi Bruce and  Nettalks gurus,

I use Nettalk 5.37 and I have a sittuation on a complex NetWebForm where entry fields(Strings) are conditional lookups. To avoid entry mistakes we have readOnly String fields which the user have to fill (For Filling We Provide Lookup) and if you add a lookup to that field nothing happens because the generated text by template is:

if not loc:viewonly and not loc:readonly
      loc:fieldclass = ''
      packet = clip(packet) & p_web.CreateStdButton('submit',Net:Web:LookupButton,loc:formname,p_web._MakeURL('XEnterprise?LookupField=auxEnterprise&Tab=1&ForeignField=Con:companyname1&_sort=&Refresh=sort'),,,,,loc:fieldclass)
    End

If I remove the readonly then it is all good.

If it is not possible to use string/readonly+lookup , I Could use the single buttone for that, but can someone post an example of code for use "LookupProcedure"  on a simple button when you click it opens popup o single page and then returns the selection to the desired field?

Thank you for tips...

linas@debetas.lt

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
    • Email
Re: Lookup button on readonly string field
« Reply #1 on: October 09, 2011, 03:10:45 PM »
to explain why I don't use drop box: the lookup window offers solutions like search, sord by columns, display more columns than one. One Word: The lookup window is 200% more convenient  to use.

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Lookup button on readonly string field
« Reply #2 on: October 09, 2011, 04:29:31 PM »
Try the following:

Remove read-only
On the template check the option "User Must choose from lookup"

I think that will do what you want...

linas@debetas.lt

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
    • Email
Re: Lookup button on readonly string field
« Reply #3 on: October 09, 2011, 06:14:22 PM »
It did the trick.  ;D and i used custom css on String to look like like readOnly- with different color.



I am still wondering how to do a lookup on "button" not on string.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Lookup button on readonly string field
« Reply #4 on: October 09, 2011, 11:17:17 PM »
Hi Linus,

Kevin had the right answer there - lookups occur on strings, not fields.
If you wish to hide the entry field itself use css for that (nt-hidden)

cheers
Bruce


linas@debetas.lt

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
    • Email
Re: Lookup button on readonly string field
« Reply #5 on: October 10, 2011, 03:59:43 PM »
yes. Solution was implemented successfully.

Nettalk is ... wOW