web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

Search Box

(0) ShareShare
ReportReport
Posted on by 28

Hi

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?

 

Thanks

Becky

 

 

 

Categories:
I have the same question (0)
  • timl Profile Picture
    36,753 Super User 2026 Season 1 on at

    Hi Becky,

    Something like this should take you closer.

    Sort(Search('Store Locations',TextInput1-Search.Text, Location, Store),
     Location,
     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.

  • BeckyC Profile Picture
    28 on at

    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?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 525 Most Valuable Professional

#2
Haque Profile Picture

Haque 308

#3
Kalathiya Profile Picture

Kalathiya 234 Super User 2026 Season 1

Last 30 days Overall leaderboard