Examples: Using keywords
- (DEFAULT) -- If the field KeyThought exists, whatever value is in that field is used for the computed field. If the field KeyThought does not exist, the value of Topic is used.
DEFAULT KeyThought := Topic; KeyThought
This formula is equivalent:
@If(@IsAvailable(KeyThought); KeyThought; Topic)
- (ENVIRONMENT) -- Converts a number to text and saves it as an environment variable.
ENVIRONMENT OrderNumber := @Text(NewOrderNumber)
- 3 (FIELD) -- This formula adds "Inc." to the value of the Company field.
@If(@Matches(@LowerCase(Company); "*, inc*"); @Return(""); ""); FIELD Company := Company + ", Inc.";
- (FIELD) -- This formula creates a new field called CompanyName to hold the name of the company plus "Inc." The field does not become visible unless you add it to the form design, but you can access it by naming it in formulas.
FIELD CompanyName := Company + ", Inc.";
- (FIELD) -- This formula deletes the field CompanyName.
FIELD CompanyName := @DeleteField;
- (REM) -- This formula contains five lines of comments before the code.
REM "6/15/95"; REM "The following formula calculates the date"; REM "for the DueDate field"; REM "DueDate is the Date field + thirty days"; REM; @Adjust(Date; 0;0;30;0;0;0)
- (REM) -- This formula contains five lines of comments before the code.
REM {1/15/01}; REM {The following formula calculates the date}; REM {for the "DueDate" field}; REM {"DueDate" is the Date field + thirty days}; REM; @Adjust(Date; 0;0;30;0;0;0)
- (SELECT) -- This formula selects all documents in the database.
SELECT @All
- (SELECT) -- This view selection formula selects only documents composed from the Product Specification form or that are response documents.
SELECT Form="Product Specification" | @IsResponseDoc
- (SELECT) -- This example changes the value of the Status field to Closed except for documents whose Categories Field is "Unsigned Contracts."
SELECT Categories != "Unsigned Contracts"; FIELD Status := "Closed"