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 Platform Community / Forums / Power Apps / searching multiple col...
Power Apps
Unanswered

searching multiple columns and more than one thing at a time

(0) ShareShare
ReportReport
Posted on by 14

I am currently working on a canvas app that holds inventory for my company but currently when I search in the gallery using the search bar if search by item name it comes up but i would also like to search by location part number. Does anyone have any ideas?  currently by default the app has this as the formula for the gallery     sortbycolumns(filter([@'engineering Inventory'], startswith(title, textsearchbox1.text)), 'title', if(sortdescending1, descending, ascending))

Categories:
I have the same question (0)
  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Hi,
    You can use below formula - 
    SortByColumns(filter([@'engineering Inventory'], StartsWith(title, textsearchbox1.text) || StartsWith(Location, textsearchbox1.text)), 'title', if(sortdescending1, descending, ascending))

  • jose8255 Profile Picture
    14 on at

    no this formula does not work at all the whole thing is lit up 

  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    what is the error that you are getting ?
    Can you please share a screenshot of it

  • jose8255 Profile Picture
    14 on at

    here is a pic of the error 

    IMG_4302.jpg
  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Is Location a choice field, If Yes, the use below formula - 

    SortByColumns(Filter(AddColumns([@'engineering Inventory'],"LocationCustom", Location.Value), StartsWith(Title, TextSearchBox1.Text) || StartsWith(LocationCustom,TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))

    If Location is pf type Single line of text, then try below (made some changes in syntax) - 

    SortByColumns(Filter([@'engineering Inventory'], StartsWith(Title, TextSearchBox1.Text) || StartsWith(Location,TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))

  • jose8255 Profile Picture
    14 on at

    it is not a choice field its a single line of text and im still getting a error attached is a pic of the error 

    IMG_4303.jpg
  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Please try the below formula:
    SortByColumns(Filter(AddColumns([@'engineering Inventory'],"LocationCustom", Location.Value), StartsWith(Title, TextSearchBox1.Text) || StartsWith(LocationCustom,TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))

  • jose8255 Profile Picture
    14 on at

    sorry again tons of errors throught the whole 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard