FORMULA LANGUAGE


Examples: @If
1. This formula tests the single value in the CostOfGoods field. If the value is greater than or equal to 12.45, the condition is True, and the string "Over Budget" is returned. If the value is less than 12.45, the condition is False and the string "Bill of Materials OK" is returned.
2. In this example, if CostOfGoods is less than 12.45, the null string is returned.
3. In this example, @If looks at the value in the CostOfGoods field; if the value is greater than 12.45, then the string "Over Budget" is returned; if not, Notes skips to the next condition. The second condition also evaluates the CostOfGoods field and if the value is less than 12.45, then the condition is True and Notes returns the string "Bill of Materials OK." If the value is neither greater than nor less than 12.45, Notes moves on to the "else" action specified, and the string "Estimate Right on Target" is returned.
4. Notes first checks that the document has never been saved; if the condition is True, the value in the field NewNoteTitle is returned. If the first condition is False, Notes then checks whether the view is the Author View; if this is True, the value in the field ByAuthorTitle is returned. If both conditions are False, the value in the field StandardTitle is returned.
5. This code, when used as the Input Validation for the phoneNumber field prohibits a form from being saved until the user enters a value in the phoneNumber field. This formula demonstrates how to test more than one statement, since a phone number is only required if the contactMe field is set to Yes, indicating that the user wants to be contacted.
See Also