Early Access: The content on this website is provided for informational purposes only in connection with pre-General Availability Qlik Products.
All content is subject to change and is provided without warranty.
Skip to main content Skip to complementary content

FindOneOf - script and chart function

FindOneOf() searches a string to find the position of the occurrence of any character from a set of provided characters. The position of the Nth occurrence of any character from the search set is returned where N is the optional third parameter of the function. If no third parameter is supplied, the first occurrence is returned. If no match is found, 0 is returned.

Syntax:  

FindOneOf(text, char_set[, count])

Return data type: integer

Arguments
Argument Description
text The original string.
char_set A set of characters to search for in text.
count Defines which occurrence of any of the characters to search for. For example, a value of 2 searches for the second occurrence.
Example: Chart expressions
Example Result
FindOneOf( 'my example text string', 'et%s' ) Returns 4 because e is the fourth character in the example string.
FindOneOf( 'my example text string', 'et%s', 3 ) Returns 12 because the search is for any of the characters e, t, % or s, and t is the third occurrence in position 12 of the example string.
FindOneOf( 'my example text string', '¤%&' ) Returns 0 because none of the characters ¤, %, or & are found in the example string.

Example - FindOneOf fundamentals

Example - FindOneOf scenario

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!