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
Highlighted
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
Highlighted
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
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,367)