This section contains brief descriptions of the functions that return information about a specified array.
Function | What it does |
---|---|
arraytostring | Given array data, the beginning pattern, the ending pattern, and the separator, returns a string. |
elementcount | Returns the number of non-null or non-empty elements in an array. |
nextelement | Given an array field and an index into the array, returns the next non-empty and non-null entry, or zero if none is available. |
elementcount(array_field)
where array_field
is the data field that contains the source data.A = ("", , "", "alpha", ,"") => elementcount(A) = 1; sizeof (A) = 6
B = (0 , , 0 , 100 , , 0) => elementcount(B) = 4; sizeof (B) = 6
Note that an empty string is not counted in string arrays, but every number is counted in numeric arrays. In other words, there are no empty numbers.
This function is useful to handle participant and attachment arrays.
nextelement(array_field, index_expr)
where:Parameter | Description |
---|---|
array_field | The data field that contains the source data. |
index_expr | The index that should be used to start the search. If it is zero, then it will start the search from the beginning of the array. |
A = ("", , "", "alpha",,"") B =(0 , , 0 , 100 , , 0)
nextelement (A, 0) = 4
nextelement (A, 4) = 0
nextelement (B, 0) = 1
nextelement (B, 1) = 3
nextelement (B, 3) = 4
nextelement (B, 4) = 6
nextelement (B, 6) = 0
This function is useful to handle participant and attachment arrays.
arraytostring(array_field, begin_expr, end_expr, separator_expr)
where:Parameter | Description |
---|---|
array_field | The data field that contains the source data. |
begin_expr | The text string that marks the beginning of the array. |
end_expr | The text string that marks the end of the array. |
separator_expr | The text string that is used to separate the elements in the array. |
arraytostring(MyXMLField, ("<tag><value>", "</value></tag>", "</value><value>")