Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Search Box


I am very new to powerapps so this is probably a very basic question but I just can't get the search to work for me.


I am connecting to a sharepoint list called Store Locations and Location is the name of the column to search on.


In Gallery - items property - this works with just wanting to sort.

Sort('Store Locations', Location, If(SortDescending1, Descending, Ascending))


But now I want to add a search box - so users can enter a location in the search box that will then show only that location.


I have tried to change the items property for gallery to 

Sort(Search('Store Locations','TextInput1-Search' Location, Store),Location If(SortDescending1, Descending, Ascending))

but I keep getting an error message with that.  I'd appreciate any help that you can give.


And a follow-up question - do I need to add any properties to the search box field?







Super User III
Super User III

Hi Becky,

Something like this should take you closer.

Sort(Search('Store Locations',TextInput1-Search.Text, Location, Store),
     If(SortDescending1, Descending, Ascending)

The main thing is the part where you reference your text input control. If the name of your text input control is TextInput1-Search, TextInput1-Search.Text returns the contents of the text input control. Also, your formula was missing a comma.

In answer to your second question, there are no specific properties that you need to add to your search box.

Frequent Visitor

I tried the above and I still have something incorrect.  I am getting the error 

Invalid argument type (record). Expecting a text value instead


I think that the error is in my search function, but I don't know why. I got rid of the sort and only have

Search('Store Locations',TextInput1-Search.Text,Location)

and I get:

The search has some invalid arguments.  I took out the search for Location & Store because store is a numeric field and I wondered if that was the issue - location is a text field.  My search box has the format of text.


So can someone tell me what I am doing wrong with my search formula?

Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,624)