SUBF$ Function
Use: | Required when ASSIGN, CONFIRM, INPUTBOX, or PICKARRAY function parameters are used for the true/false values in the IFELSE Function. The addition of this subfunction ensures that the IFELSE function is evaluated correctly and returns the valid true or false value. |
Syntax: |
|
Arguments: |
|
Returns: | The true or false value based on the condition and function type |
Example 1: | The ASSIGN function assigns a source value to the destination field(s) or variable(s).
Result: If 1 is entered in the input field, value 1 is assigned to template fields 1 and 2. If a value other than 1 is entered in the input field, value 2 is assigned to template fields 3 and 4. |
Example 2: | The CONFIRM function displays a window with a user-defined confirmation message and Yes and No buttons.
Result: If a checkbox with a value of 1 is selected, and a value is changed in the input field, a window opens a warning message that the existing value will be overwritten. If a different checkbox or no checkbox is selected, and the input field is empty, a window opens a message questioning whether a value should be added. In either case, the user must respond by selecting the Yes or No button. |
Example 3: | The INPUTBOX function displays a custom window to gather input from the user. The input box may include a picklist of available options.
Result: If 0 is entered in the input field, an input box displays with picklist values from the @maritalstatus array. If a value other than 0 is entered in the input field, an input box displays with picklist values from the @employmentstatus array. |
Example 4: | The PICKARRAY function displays the values of an existing Array variable in a picklist for user selection.
Result: If 0 is entered in the input field, a picklist displays with sorted values from the @vitamins array. If a value other than 0 is entered in the input field, a picklist displays with sorted values from the @drugs array. If no selection is made, the default value of None is used. |