Functions for string values

Functions for string values can be used in expressions.
Table 1. Functions for string values
Function Description Syntax
format Result is a value that is changed to human-readable format. Valid for date, currency, and actor fields. For example, use format to make a date human readable so that it can then be appended to a text string. Use format to make an actor field human readable so that a user's name can be inserted in a text string. Do not use format for a date subject to an equation.

format(input)

Example:

format([$fdGroup1:fdDate1$]) or format([$fdGroup1:fdCurrency1$])
indexOf Result is the index of the first occurrence of string2 out of string1. It is used to get parts of a string.

If string1 is a list, the indexOf function is applied to all items in the list. The result is a list of integers.

indexOf(string1,string2)

Example:

indexOf('abcdefedcba', 'c') result is 2
join Joins a list of strings, where delimiter is a delimiter. For example, use to build a list of child action item names separated by commas.

join(delimiter,list1)

Example:

join('-', ['a','b','c']) result is a-b-c
LastIndexOf Result is the index of the last occurrence of string2 out of string1.

If string1 is a list, the LastIndexOf function is applied to all items in the list. The result is a list of integers.

LastIndexOf(string1,string2)

Example:

lastIndexOf('abcdefedcba', 'e') result is 6
length Result is the length of a string value. For example, if you know the length, you can use it in an expression to remove part of a string.

If string1 is a list, the length function is applied to all items in the list.

length(string1)

Example:

length('abcdef') result is 5

substring Result is a portion of a string. The portion can either be from a given start index position to the end of the string or from given start and end index positions. Can have one or two arguments. If one argument is given, the result is a string value from the given index position to the end of the string. If two arguments are given, result is the portion of a string between the index positions. For example, if a unique identifier is part of an object name that was assigned using autonaming, use substring to extract the positions that contain the identifier.

If list1 is itself a list, the substring function is applied to all items in the list. The result is a list of substring values.

substring(list1,indexPosition1, indexPosition2)

substring([$fdGroup1:fdStr1$], 5)

substring([$fdGroup1:fdStr1$], 5, 10)

split Splits string1 into a list by delimiter as the delimiter. The delimiter is regular expression.

split(string1,delimiter)

Example:

split('abc2def3ghi7','[0-9]') result is list of abc, def, ghi. Any digit from 0-9 is a delimiter.
Table 2. Examples of expressions for string operands and functions
Expression Result Note
'Control last updated on' + format (max ([$Child:SoxControl/System Fields:Last Modification Date$])) Control last updated on October 29, 2020 Given that the object was last updated on October 29, 2020