cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
EJSPoelen
New Member

Search Filter on multiple SharePoint List columns with various column types

I created a PowerApps with a Gallery + Search Box that connects to a SharePoint list.

 

When typing in the Search Box I would like to "Search" through multiple columns, of which some are non-text columns, such as a "Choice" field. This seems rather obvious as SP Lists often consist of non-Text fields.

 

Is there a way to get this done?

 

This function doesn't accept non-text Fields:

SortByColumns(Search('SharePointList';SearchTextBox.Text; "Title";"Choicefield");"Title"; If(SortDescending1; Descending; Ascending))

 

2 REPLIES 2
WarrenBelz
Super User
Super User

Hi @EJSPoelen ,

You are correct that Search only works on Text fields - try this

SortByColumns(
   Search(
      AddColumns(      
         'SharePointList';
         "MyChoice";
         ChoiceField.Value
      );
      SearchTextBox.Text; 
      "Title";
      "MyChoice"
   );
   "Title"; 
   If(
      SortDescending1; 
      Descending; 
      Ascending
   )
)

Bear in mind that the data structure is in your control - you do may not need Choice fields - I have a blog that may be of use to you.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

WarrenBelz
Super User
Super User

Hi @EJSPoelen ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (5,311)