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 / multiple columns search
Power Apps
Unanswered

multiple columns search

(0) ShareShare
ReportReport
Posted on by 3

Hello,

 

I have looked on various posts about this, but I still get an error code returned when I try to make the process work.  I am trying to have my SharePoint365 list called "stock" to search for fields in multiple columns.  The current code I have is the following:

 

SortByColumns( Search(Stock, TextSearchBox1, Device_x0020_Type, Title), "Device_x0020_Type", "Title", If(SortDescending1, Descending, Ascending))

 

Any advice would be great!

Categories:
  • v-micsh-msft Profile Picture
    Microsoft Employee on at

    Hi @JPGT1,

     

    Take a try to switch the formula as below:

    SortByColumns( 
    Search(Stock, TextSearchBox1.text, Device_x0020_Type, Title),
    "Device_x0020_Type",If(SortDescending1, Descending, Ascending),
    "Title", If(SortDescending1, Descending, Ascending)
    )

    Function reference:

    Sort and SortByColumns functions in PowerApps

    Filter, Search, and Lookup functions in PowerApps

    Check to see if this would make it work.

     

    Regards,

    Michael

  • JPGT1 Profile Picture
    3 on at

    Thanks, Michael.

     

    I tried this, but now get the error "The function 'sortbycolumns' has some invalid arguments".  After trying this, I tried the following string which seems to show what I need.  Would this cause any issues using this?

     

    Search( Stock, TextSearchBox2.Text, "Title","Device_x0020_Type" )

     

    Thanks!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 339 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 289

#3
Mohsin Ali Profile Picture

Mohsin Ali 228

Last 30 days Overall leaderboard