Find function in Power Apps

The Find function finds a string of text, if it exists, within another string and returns the starting position of the string that was found. Position 1 is the first character of the string.

Power Apps Syntax Find(FindString, WithinString [, StartingPosition ])
• FindString - Required. The string to find.
• WithinString - Required. The string to search within.
• StartingPosition - Optional. The starting position to start searching. If we don’t define, its value is 1.

Example : In this example, we use a text label control to give a string data source. Set the Text property of the Label control to the “Ashish Goel is a developer.”

Case 1: Basic search

Power Apps Formula

Find("dev", Label1.Text)

Here, Label1 is the name of the Text label control.

Find function in Canvas Power Apps

Case 2: When multiple results are found

The find function returns the first result that it found in the string, ignore the rest.

Power Apps Formula

Find("sh", Label1.Text)

As the “sh” string is also available at position 5, but the find function return the first result.

Find function in Canvas Power Apps

Case 3: With StartingPosition Parameter

We can get the later result by using the StartingPosition parameter in the function, which is optional.

Power Apps Formula

Find("sh", Label1.Text,3)

In the above formula, the StartingPosition parameter value is 3, so the function starts its search from the 3rd character.

Find function in Canvas Power Apps

Case 4: Case Sensitive Search

The Find function is case sensitive. To ignore case, first use the Lower function on the arguments.

Power Apps Formula

Find("SH", Label1.Text)

The Find function returns blank if the string in which we are searching doesn't contain the string for which we are searching.

Find function in Canvas Power Apps

The use of Lower function on the arguments.

Power Apps Formula

Find(Lower("SH"), Lower(Label1.Text))
Find function in Canvas Power Apps