NetTalk Central

Author Topic: Showing description of lookup field on the netxt line (i.e. under de code field)  (Read 13500 times)

Rene Simons

  • Hero Member
  • *****
  • Posts: 649
    • View Profile
Hi,

For some reason, it might be handy when the description of a code is displayed Under the code field in stead of behind the code field
Here is a way I figured out how to do things without too much hassle. Describing it was more difficult than doing it.

   1. I Define the lookup field (CODE:Field) like any other lookupfield.
   2. As display field I use a small dummy field (like a 1 char string), just to fool the template.
   3. On the client side tab I check the "send new value to server"-box.
   4. In the reset-list for the form I add the REAL:DisplayField. This field can be the original display
       field belonging to the CODE:Field
   5. In the servercode I do: p_web.ssv('REAL:DisplayField', getCodeDesc(Code:Field))
       where getCodeDesc is a function that gets the description for the code.
   6. Finally I add a condition to the REAL:DisplayField, to hide it when it's blank   
       (p_web.gsv('REAL:DisplayField') = ''  ), to prevent the description field from being shown when
        there is no description.
       To make sure that showing the description goes smoothly, you can also add a dummy field after
       the REAL:DisplayField that has a complementary condition.
   
Have fun
Rene
Rene Simons
NT14.14