FORMULA LANGUAGE


Examples: Getting user input with @Prompt and @PickList
1. (YesNo). This validation formula queries the user concerning the TotalAmount field. If the user clicks No, a failure message is posted.
2. (OkCancelEdit). This button formula queries the user for a server and database, and opens the database. If the user clicks Yes without first entering a value in the edit box, the value returned is an empty string.
3. (Password). This field validation formula gets a password from the user and compares it to the Password field in the document.
4. (OkCancelList). This formula presents the user with a list of databases in a database catalog, and opens the database that the user selects. The first @DbColumn puts a list of the values in column 4 of the Databases by _Replica ID view in the temporary variable titles. The second @DbColumn puts a list of the values in column 2 of the Databases by _Replica ID view in the temporary variable servers. The third @DbColumn puts a list of the values in column 3 of the Databases by _Replica ID view in the temporary variable databases. The temporary variable list combines titles, servers, and databases for presentation to the user in @Prompt. The formula then parses the return value from @Prompt into a server name and database name for inclusion in the FileOpenDatabase @command.
5. (OkCancelListMult). This button formula presents the user with a list of department names and sales totals. The user selects any number of elements from the list and the formula calculates a grand total.
6. (Custom). This button formula presents the user with the "Databases by Replica ID" view from catalog.nsf on the server named doc. The user selects an element (row) from the list (view) and the formula opens that database with its name in column 3 of that row.
See Also