This section describes functions for handling and manipulating strings. In the functions below, the parameters are expressions where s
should be interpreted as a string.
All functions can be used in both the data load script and in chart expressions, except for Evaluate which can only be used in the data load script.
Use the drop-down on each function to see a brief description and the syntax of each function. Click the function name in the syntax description for further details.
Applies a different codepage to the field
or text stated in the expression. The codepage must be in number format.
ApplyCodepage(text,
codepage)
Capitalize() returns the string with all
words in initial uppercase letters.
Evaluate() finds if the input text string can be evaluated as a valid Qlik Sense expression, and if so, returns the value of the expression as a string. If the input string
is not a valid expression, NULL is returned.
FindOneOf() searches a string to find the position of the occurrence of any character from a set of provided characters. The position of the first occurrence of any character from the search set is returned unless a third argument (with a value greater than 1) is supplied. If no match is found,
0 is returned.
Index() searches a string to find the starting position of
the nth occurrence of a provided substring. An optional third argument provides the value of n, which is 1 if omitted. A negative value searches from the end of the string. The positions in the string are numbered from
1 and up.
Mid() returns the part of the string starting at the position of the character defined by the second argument, with the string length defined by the third argument, or including the rest of the string if the third argument is omitted. The first position in the string is numbered 1.
Replace() returns a string after replacing all occurrences of a given substring
within the input string with another
substring. The function is non-recursive and works from left to right.
Right() returns a string consisting of the of the last (right-most)
characters of the input string, where the number of characters is determined by the second argument.
Subfield() is used to extract substring components from a parent string field, where the original record fields consist of two or more parts separated by a delimiter.
TextBetween() returns the text in the parent string that occurs between the characters specified as delimiters. The text string between the first occurrence of the delimiters is returned unless an optional third argument (with a value greater than 1) is supplied.