|
|
|
|
| Use Abs Function To Set Pop-Up/Drop-Down Menus |
When displaying a pop-up/drop-down menu on an input form, you need some code to check the value of the field represented by the menu and select the appropriate menu item. If the current value of the field isn't found in the array, then the array is often set to the first element as a default.
LIST TO ARRAY("Status";aStatus) $element:=Find in array(aStatus;[Time_Slip]Status) If($element>0) aStatus:=$element Else aStatus:=1 End if
Since the Find in array function will return -1 if the field is not found in the array, we can use 4D's Abs function to eliminate the If test:
LIST TO ARRAY("Status";aStatus) aStatus:=Abs(Find in array(aStatus;[Time_Slip]Status)) |
|
Submit a Tip Archive  |
|
|
 |
|
|
|
| Canvas Plugin |
Canvas Plugin for Macintosh and Windows, developed by Pluggers, provides you with a rich toolbox for drawing objects inside a plug-in area and adding interactivity to those objects. You'll need to check out this plug-in to see all that it can do for you. |
|
Suggest a Spotlight
|
|
|
 |
|