FORMULA LANGUAGE


Examples: Working with lists
1. (Subscript). @DbName returns a list where element 1 is the server name and element 2 is the file name of the current database. This example gets the file name.
2. (Pair-wise operation). This example adds two numeric lists in a pair-wise operation. The resulting list has the four values 11, 22, 27, and 44.
3. (Permuted operation). This example concatenates two lists in a permuted operation. The resulting list has the 12 values Blue Sedan, Blue Coupe, Blue Van, Blue Truck, Red Sedan, and so on through Yellow Truck.
4. (@Elements). This example prints a message if the Categories field has no elements, and prints the list if it does.
5. (@Explode). This example explodes a string constant into a list using the default separators space, comma, and semicolon. The resulting list has the values Paris, London, Chicago, and Seoul.
6. (@Explode). This example explodes a string constant into a list using the separators comma and semicolon. The resulting list has the values Paris, London, New York, and Washington DC. New York and Washington DC are not separated into New, York, Washington, and DC because the space is not included as a separator.
7. (@Explode). This example includes a blank entry between London and New York. If the third parameter is @False or is omitted, multiple consecutive separators are treated as one. Ensure that the commas are consecutive and not separated by a space.
8. (@Implode). This example implodes a list constant into a string variable using a space (the default) to separate the values. The resulting string has the value Minneapolis Detroit Chicago.
9. (@Implode). This example implodes a list constant into a string variable using a comma and a space to separate the values. The resulting string has the value Minneapolis, Detroit, Chicago.
10. (@Implode). This example implodes a list field into a string using a colon to separate the values. If the Categories field is entered as Minneapolis, Detroit, Chicago, the resulting string is Minneapolis:Detroit:Chicago.
11. (IsMember). This agent example checks the selected documents to see if Adjusted is in the Categories list. If it is, Categories remains the same. If it is not, Adjusted is added to the Categories list.
12. (@IsNotMember). This example checks the selected documents to see if Adjusted and Signed off are in the Categories list. If both are not, both are added to the Categories list. If both are, Categories remains the same.
13. (@Keywords). This example finds which keywords are used in the Cities field.
14. (@Member). This example has the user pick a value from a list and displays the number of that value within the list.
15. (@Replace). This example replaces red with scarlet and blue with turquoise in the list derived from colors.
16. (@Subset). This example places New Orleans, London, and Frankfurt into first3, and Singapore and Sydney into last2.
17. (@Transform and @Nothing). This example returns a list with three elements: 1, 2, and 4.
18. (@Unique). This example returns a list with four elements: red, blue, yellow, and black.
See Also