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 Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,977)