IndexOf
Returns the location of one string within another for a Databox (Keyfax version 4.4.8 and later).
This Expression returns a number indicating the position of the first character of a string being searched for within the databox value or 0 (zero) if no string match is found.
The syntax of the expression is as follows - parameters:
1. string - a list of strings that should be searched for within the databox value 2. string - the list delimiter e.g. a comma (",") to indicate how to split the string in the first parameter 3. integer - 1 to indicate that the string comparison should ignore case, 0 to indicate that the string comparison should take case into consideration (i.e. when 1 "LiKeS" = "likes"
IndexOf("LiKeS,George", ",", 1)
George Smiley likes chess
14
As the case insensitive parameter is set to 1 the first string in the list of strings to search for 'LiKeS' is found at position 14.
IndexOf("LiKeS,George", ",", 0)
George Smiley likes chess
1
As the case insensitive parameter is set to 0 the change of case in 'LiKeS' does not match the 'likes' in the databox value, instead the second search string 'George' is matched and found at position 1.
IndexOf("NotThere", ",", 0)
George Smiley likes chess
0
As the string 'NotThere' cannot be found in the databox value the return value is 0.
Last updated