PROGRAMMING OVERVIEW AND USER INTERFACE
Examples: Column formulas
1. This formula specifies the column contents as the Subject field.
Subject
2. This formula specifies the column contents as the Subject field followed by a blank (or nothing if the Subject field is empty), followed by the From field in parentheses. By default, the From field contains the name of the author of the document.
DEFAULT From := @Author;
@If(Subject != ""; Subject + " "; "") + "(" + From " ")"
3. This formula specifies the column contents as the number 1 for Weekdays forms and 2 for all other forms. If you make this column the first column, hidden, and sorted in ascending sequence, you force the Weekdays document (or documents) to the top of the view.
@If(Form = "Weekdays"; 1; 2)
4. This formula reformats the contents of Person_Name to put the last name first followed by a comma, a space, and the first name.
@If(@Contains(Person_Name; " "); @Right(Person_Name; " ") + ", " + @Left(Person_Name; " "); Person_Name)
5. This formula puts the name of the current weekday in the column, except that Saturdays and Sundays are treated as Fridays.
T := @Weekday(@Now);
@If(T = 2; "Monday"; T = 3; "Tuesday"; T = 4; "Wednesday"; T = 5; "Thursday"; "Friday")
6. For a database that contains an "acl" Dialog list field that is set to Use Access Control List for choices and that has the following view and column properties settings:
In the View Properties box:
Change the Lines per row to the number of carriage returns you want to include in the row (maximum available is 9).
Select Shrink rows to content.
In the Column Properties box:
Choose New Line as the Multi-value separator.
Deselect the Show multiple values as separate entries check box.
This formula populates the column with a maximum of nine entries from the access control list for the current database:
acl
See Also
Column formulas
Glossary
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Glossary