PhixFlow Help

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Current »



Function: countElements()

Returns the number of elements in an Array or Recordset.

Syntax

countElements(list)

ArgumentTypeDescription
listArray or RecordsetThe object to be counted.

Examples

countElements([1,2,"many"])

Returns the number of elements in this list, 3

countElements($list)

Returns 3 since this list has the value [1,2,"many"]

countElements(in)

Returns the number of records being read from the 'in' pipe during the current stream processing cycle. This can be useful when deciding whether or not to read values from a pipe, for instance when using calculate streams.

countElements(in.AnyFieldName)

Also returns the number of records being read from the 'in' pipe, if AnyFieldName is an attribute that exists on the stream being read from.

countElements(lookupPipe)

Returns the number of rows in the Pipe referenced by lookupPipe.

$userArray = split(in.users,","), $numUsers = countElements($userArray)

in.users is a list of user names separated by commas. The split() function converts this into an Array and countElements() returns the number of users.

See Also

  • No labels