I have a PowerApp with a SharePoint list as datasource. I want to do the following:
Filter the list display in Gallery based on the following test: Show the list of records for which the current user is listed as the product manager. The Product Manager field is populated from a Person/Group field in the SP List. I'm having a hard time doing this, as it seems to be a mismatch of field types. It actually works if I search on email for current user and = it to email of Product Manager, but it doesn't actually filter anything.
Hi @CaroleKV ,
Filter(SPListName, User().Email in Productmanager.email) // This works only for single people picker selection Filter(SPListName, User().Email in Concat(Productmanager,Email&",") // This works only for single people picker selection
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.
Based on the issue that you mentioned, do you want to filter the gallery based on the user?
Combine that with your description, you want to check if the current user exists in the Product Manager column, if it does, filter the gallery based on the Person/Group column.
Thanks for @KrishnaV posting a solution. I will make some addition to this issue. As an alternative solution, you can try the formula below.
Filter(DataSource,PersonColumn.Email = CurrentUser)
Note: If this can not solve your issue, please post some screenshots about the error message.
The problem I couldn't get around was that the User record type is not the same as the Person record type at all. And the person type turns the name into LastName,First instead of First Name Last Name, so it was never matching. I got around this by using the Office365User data connection, and converting the name into LastName, First so it would find a match. That solved the problem. My other problem was that this code is amongst a whole bunch of other Filter and Search code on that same gallery, so it was hard to even figure out where to put it, much less what it should be.
Check out our new profile badges recognizing authored solutions!
We are excited to announce the Power Apps Super Users!
Did you miss the call? Check out the Power Apps Community Call here.
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!