cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JPGT1
Frequent Visitor

multiple columns search

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!

2 REPLIES 2
v-micsh-msft
Community Support
Community Support

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

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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!

Helpful resources

Announcements
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

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (18,153)