FORMULA LANGUAGE


Examples: @IfError
1. This agent tests the return value of an @DbLookup statement for an error. If the @DbLookup statement causes an error, the agent returns the text "Not available."
2. The following code, when added to a Computed for display field, displays the price of the product entered in the "product" field, after a page refresh. Enter the text, "Enter product name here" as the default value for the product field. Once a user enters a product name in the product field and presses F9, the price is extracted from the Goods view, which contains the product name in the first sorted column and its price in the second column. If the product name is not recognized or any other error occurs during the lookup, the message, "Unable to retrieve requested price. Aborting lookup" displays. You could add a Get Price action button that contains the code: @Command([ViewRefreshFields]) to prompt the user to refresh the page.
3. This formula, when added to the "Apply font" hotspot button, applies the font a user selects from the "fonts" Dialog list field to the text the user enters or highlights in the "Body" Rich Text field. The "fonts" field contains an @FontList function in the Use formula for choices box in its Field Properties box, which displays a list of available fonts. If no font was selected from the "fonts" field, an error message displays which instructs the user to select one.
See Also