cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cooper33
Level 8

Use a textbox to search multiple fields using In

I have a gallery connected to a SharePoint list with several multi user fields. I want to search for a user and then find items where they appear in any of the fields. I am searching for other users, not myself.

I have gotten it to work searching for when they appear in one column by converting the people label to text but want to add a condition where they can appear in the second/third column as well. Here is what is working for one column:

Filter(TextInput1.Text in Text(Concat(Manager.DisplayName, Text(DisplayName) & " ")))

When I tried to copy the same formula for the second column, it works by finding searched users where they're only in both columns:

Filter(RecordsCollection, TextInput1.Text in Text(Concat(Manager.DisplayName, Text(DisplayName) & " ")), TextInput1.Text in Text(Concat(Associate.DisplayName, Text(DisplayName) & " ")))

Is there any way to make this an OR query instead of AND? I tried using the OR operator as well but it errored

TextInput1.Text in Or(Text(Concat(Manager.DisplayName, Text(DisplayName) & " ")), TextInput1.Text in Text(Concat(Associate.DisplayName, Text(DisplayName) & " ")))
1 ACCEPTED SOLUTION

Accepted Solutions
cooper33
Level 8

Re: Use a textbox to search multiple fields using In

Used || for Or instead of the Or formula: 

Filter(RecordsCollection, (TextInput1.Text in Text(Concat(Manager.DisplayName, Text(DisplayName) & " ")) || TextInput1.Text in Text(Concat(Associate.DisplayName, Text(DisplayName) & " "))))

View solution in original post

1 REPLY 1
cooper33
Level 8

Re: Use a textbox to search multiple fields using In

Used || for Or instead of the Or formula: 

Filter(RecordsCollection, (TextInput1.Text in Text(Concat(Manager.DisplayName, Text(DisplayName) & " ")) || TextInput1.Text in Text(Concat(Associate.DisplayName, Text(DisplayName) & " "))))

View solution in original post

Helpful resources

Announcements
thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,804)