An Array, or ordered list of values, is a common data structure in programming languages. This page is dedicated to the discussion of a standard format for array's within FileMaker, along with a set of custom functions used to create/access data in this format.
Dan Smith's Proposal
I plan to use the same method of encoding each values in an array, as used by the # ( name ; value ) function. The only difference is the name will be omitted, which will result in a return-delimited list of encoded values.
Encode a value in a manner that preserves the data type and escapes all returns/new lines, then append a trailing return.
Retrieve a value from a list created with the #List ( value ) function. Preserve the data type and all special characters of the original value.
Other Array Operations
Since #List ( value ) produces a return-delimited list, all of FileMaker's list-related functions can be used to manipulate an array:
Jeremy Bante's Proposal
I propose an alternate technique for handling array data that strictly follows the Let notation format. Let notation is defined by FileMaker's built-in behaviors — if FileMaker variables support something, so does Let notation. This means that Let notation already supports value names using FileMaker's repeating variable syntax. Most of the custom functions supporting this proposal are merely syntactic sugar for behaviors we can already implement with the existing parameter interface functions. Any solution already using Let notation does not need any extensions to be compatible with such arrays. However, this format is less well suited for manipulation with FileMaker's built-in functions for manipulating return-delimited lists.
The #Array function is syntactic sugar for the # ( name ; value ) function using repeating variable names. As with the # function, the data type of the encoded value will be preserved.
Values created with the #Array function are accepted by the #Assign function, and would be set to locally scoped variables.
The #ArrayGet function is syntactic sugar for the #Get function using repeating variable names.
The #ArrayFromList function is a convenience function for creating a repeating variable array in Let notation from an existing return-delimited list.