List and String List

The list data type contains a sequence of strings. String list objects allow you to select lists of values, either returned from a List data type property, by converting a node list into a list of strings using the toStringList method, or by splitting a string into a string list using the Split method.

After you add a list data type property or a string list object, you can add the following methods. After you add a method, you must specify a condition for that method that can be evaluated to a Boolean value.

Method Description Data Type of Returned Object Parameters Example
Any Returns True if any of the strings in a string list match the specified condition Boolean The condition that the string list object gets evaluated against node.properties.PLN.UDA (Account).any.stringItem.matches("UDA")) will return True if any of the strings in the string list match "UDA".
Count Returns a count of the strings in a list that match a specified condition Integer The condition that the string list object gets evaluated against node.properties.PLN.UDA (Account).count.stringItem.greaterThan("ABC")) will return the number of strings in a string list whose value is greater than "ABC."
Find Returns the first string in a string list that matches a specified condition String The condition that the string list object gets evaluated against node.properties.PLN.UDA (Account).find.stringItem.equals("Expense")) returns the first string in a string list of a selected node whose name equals "Expense".
Get Returns the string in a string list at the specified index String The index to return the string from

Note: Positive index numbers (or zero) count from the first index to the last, with zero being the first index. Negative index numbers count from last to first.

node.properties.PLN.UDA (Account).get(0) returns the first string in the PLN.UDA (Account) string list.
IndexOf Returns the position of the specified string in a string list.

Note: Returns -1 when the specified string is not found.

Integer The specified string that you want to return the position for. node.ancestors[name].toStringList.indexOf(Texas) returns the starting position of the specified string "Texas" in the string list of ancestor names for a node.
Intersect Returns the common values that exist in both specified lists. String List A second string list that you are comparing to the first string list for common values. node.ancestors[name].toStringList.intersect(node.properties.UDA) returns the common values that exist in both the list of ancestor names for a node and the node.properties.UDA string list.
IsEmpty

Returns True if the property contains either a null value or an empty string.

Boolean None node.properties.PLN.UDA (Account).IsEmpty returns True if the value of the PLN.UDA (Account) string list is null or empty.
isNull Returns True if the property contains a null value.

Note:

The isNull method is available for list data type properties only. You cannot use isNull for string lists from the toStringList or Split methods.
Boolean None node.properties.PLN.UDA (Account).isNull returns True if the value of the PLN.UDA (Account) string list is null.
Join Concatenates string values from a list into a delimited string using the specified delimiter String The delimiter that separates each string return.node.properties.PLN.UDA (Account).join("|") returns a string that consists of all of the strings in the PLN.UDA (Account) string list concatenated together and separated by "|".
Reverse Returns the string list values in the reverse order. String List None node.ancestors[name].toStringList.reverse returns a list of ancestor names for a node in reverse order.
Size Returns the number of strings in a string list

Note: The Size method is different from Count in that it does not require a predicate condition.

Integer None return.node.properties.PLN.UDA (Account).size returns the number of strings in the PLN.UDA (Account) string list as a string value.