The StartsWith function in Power Apps is used to check if a text string begins with a specific sequence of characters. It’s typically used for filtering data or validating user input.
Syntax:
StartsWith(Text, StartText)
- Text: The full text string you want to check.
- StartText: The text you want to verify is at the beginning of the full text string.
As you can see, we have a Gallery control here displaying employee details. This Gallery is connected to a SharePoint list data source named ‘Employee Info’.
Using StartsWith function to filter a Gallery Based on Text Input
If you have a gallery displaying a list of items and you want to filter it based on a text input box (e.g, a search box), you can use the StartsWith function.
Let’s add a Text Input control and named it txt_search.
Next, go to Items property of Gallery and write the below formula.
If(  txt_search.Text <> "",  Filter(    'Employee Info',    StartsWith(      EmpName,      txt_search.Text    )  ),  'Employee Info' )
In the above formula StartsWith function checks if the EmpName field starts with the text entered in the search box txt_search.

Let’s enter an employee name in the search box to see how the StartsWith function works.
You can see as soon as you start typing ‘Ra’ in the search box, the gallery filters and displays all employee names that begin with ‘Ra’.

Delegation Consideration:
StartsWith function may trigger delegation warnings when used with large data sources like SharePoint, SQL, or Dataverse.
In such cases, Power Apps may process only a limited set of records locally, potentially leading to incomplete results.
![]()

