FORMULA LANGUAGE


Examples: Accessing the current document
1. This example of a computed field value performs an arithmetic operation involving two other fields in the document. These fields must exist in the document, must be numeric, and must be initialized to a numeric value.
2. This agent example performs an arithmetic operation on two fields in the current document, and assigns the result to a third field. The two referenced fields must exist; GrossSales can be new.
3. This agent example performs an arithmetic operation on two fields in the current document, and either assigns the value to a third field or sends a mail message. The first statement initializes GrossSales and is not necessary if you are certain the field already exists.
4. This column formula example evaluates to the value of KeyThought for documents that contain that field. If a document does not contain a KeyThought field, it "defaults" to the value of Topic.
5. This is another way of coding the above example.
6. This agent example deletes the GrossSales field.
7. This agent example calculates the GrossSales field, then displays the result and does not mark the document for update. As a result, no change takes place in the document in storage. The changes are saved if @DocMark is omitted or "@DocMark([Update])" is specified.
8. This example displays all the fields in the current document.
9. This window title formula displays "New Document" for a new document. For an existing document, the formula displays the Subject field and the number of responses.
10. This view selection formula selects all documents except those for which the Form field contains "Profile" or "Log."
11. This view selection formula selects all documents for which the Subject field contains "acme" in any case, plus all their descendants.
12. This form action formula displays the names and lengths of all attachments in a document, or "No attachments" if the document has no attachments.
13. This onHelp event returns the name, row, and column of a table that is currently in focus.
See Also