cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Magnifica-p
Level: Powered On

Search Gallery by Sharepoint People picker field and Lookup Field

Hello,

 

I have a gallery Projects, which i want to search by Users who are tagged to the Project (People Picker Field Sharepoint) and also the Project item has a loopUp Field with clients, which i would also like to search for and display the project item.

 

Is there a way to search for all of these informations?

 

search3.PNG

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Search Gallery by Sharepoint People picker field and Lookup Field

Here is an example where I am filtering my data either with or without a person selected.  This is controlled by a toggle.  The default is the toggle is set to No and it uses the 2nd filter statement.  But if the toggle is yes, as in this example, it takes the name of the individual who has been selected and also used that in the filter statement.  Notice that I needed to use the DisplayName of the person column to test with on the filter.

 

1AAA.png


Depending on how you construct your search fields (separate fields or only one box when compares against several columns), you may need to use the In operator to test if your search string is contained within the columns you want when constructing your filter vs simply being able to test for equal as I have done in my example.

Super User
Super User

Re: Search Gallery by Sharepoint People picker field and Lookup Field

Yes, you can filter by a People picker column.  Since your column allows multiple people, you will need to use the In operator.  With a SINGLE user column, when you start entering data, it will immediately filter.  However, with a multi-user column, it does not appear to apply the filter until the entire display name is entered.  I tested this using a TextInput, TextInput2 which I used to filter a gallery containing a multi-user column, TestPerson. 

 

Filter(TestList,  TextInput2.Text in TestPerson.DisplayName )

When I entered anything up to Valone, Lor I saw no result from the gallery.  As soon as I entered the final i (Valone, Lori) my filtered gallery was displayed.  

5 REPLIES 5
Super User
Super User

Re: Search Gallery by Sharepoint People picker field and Lookup Field

Here is an example where I am filtering my data either with or without a person selected.  This is controlled by a toggle.  The default is the toggle is set to No and it uses the 2nd filter statement.  But if the toggle is yes, as in this example, it takes the name of the individual who has been selected and also used that in the filter statement.  Notice that I needed to use the DisplayName of the person column to test with on the filter.

 

1AAA.png


Depending on how you construct your search fields (separate fields or only one box when compares against several columns), you may need to use the In operator to test if your search string is contained within the columns you want when constructing your filter vs simply being able to test for equal as I have done in my example.

Community Support Team
Community Support Team

Re: Search Gallery by Sharepoint People picker field and Lookup Field

Hi @Magnifica-p 

 

Do you test with @LRVinNC 's suggestion?

If yes, please accept it as solution.

 

More information:

function-filter-lookup

 

Best Regards.

Yumia

Magnifica-p
Level: Powered On

Re: Search Gallery by Sharepoint People picker field and Lookup Field

@LRVinNC  Thank you for your replay,

its not quite what i am searching for.

 

The use case is this:

I have a sharepoint list with the fields Title (text), client (look up field to another sharepoint list), and users (people picker field (multiple people)

 

So what i want to filter the gallery is this

Filter(Projekte; Txt_Suchfeld_1.Text in Kunde.Value || Txt_Suchfeld_1.Text in Titel || Txt_Suchfeld_1.Text in Mitarbeiter.DisplayName)

Till now its working with the titel and the client (Kunde)

but not with the users (Mitarbeiter). I cant filter to the people assigned to the project. Is there a way to filter the projects by the name of the user within the people picker field?

 

The filter with

Filter(Projekte;  Txt_Suchfeld_1.Text = Mitarbeiter.DisplayName)

doesnt work at all. no results.

Also with the operator 'in' it doesnt work, but here there is no error, just at first I see all the values but no result if i start typing in something.

Filter(Projekte; Txt_Suchfeld_1.Text = Mitarbeiter.DisplayName)

 

Super User
Super User

Re: Search Gallery by Sharepoint People picker field and Lookup Field

Yes, you can filter by a People picker column.  Since your column allows multiple people, you will need to use the In operator.  With a SINGLE user column, when you start entering data, it will immediately filter.  However, with a multi-user column, it does not appear to apply the filter until the entire display name is entered.  I tested this using a TextInput, TextInput2 which I used to filter a gallery containing a multi-user column, TestPerson. 

 

Filter(TestList,  TextInput2.Text in TestPerson.DisplayName )

When I entered anything up to Valone, Lor I saw no result from the gallery.  As soon as I entered the final i (Valone, Lori) my filtered gallery was displayed.  

Magnifica-p
Level: Powered On

Re: Search Gallery by Sharepoint People picker field and Lookup Field

yes thank you! I have the same issue with the name.

 

couldnt filter by givenname and/or surname there either...