Notifications
Announcements
Hi Experts,
I have a Gallery (named Gallery2) that shows items from a sharepoint list (named ChangeMaster)I would like the Gallery to only show the items that has the approvers name in either of two columns (named 1stApprover or 2ndApprover) but also the column named ChangeStatus must be set to Submitted or 1st Stage Approved. The gallery should be blank if either of these conditions are not met. Approver1 and Approver2 can have multiple names in each row, so the formula would need to be able to look at the whole or part of the field to find the users email address.
Hopefully that makes sense
Thanks in advance!
Hi @Dave-ITMan ,You can try using something like below on Items property of Gallery2 -
Filter(ChangeMaster, (User().Email in Approver1.Email || User().Email in Approver2.Email) && (ChangeStatus .Value="Submitted" || ChangeStatus .Value="Approved"))
Hi @NandiniBhagya20 ,
Thanks, it's doing the first part of showing only the ones with the name in Approver1 or Approver2 but not doing the && part of only the ones showing Submitted or Approved, it's showing some blank ChangeStatus too?
Many thanks
Filter(ChangeMaster, (User().Email in Approver1.Email || User().Email in Approver2.Email) && ((ChangeStatus .Value="Submitted" || ChangeStatus .Value="Approved") && !IsBlank(ChangeStatus .Value)
))
Filter(ChangeMaster, (User().Email in Approver1.Email || User().Email in Approver2.Email) && ((ChangeStatus .Value="Submitted" || ChangeStatus .Value="Approved") && !IsBlank(ChangeStatus .Value)))
Try this ^
Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful because this can help others.
LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/ YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg Twitter: https://twitter.com/phipps0218
Hi @NandiniBhagya20 and @phipps0218
Thanks, i've had to amend your recommended code to the below for it to not throw errors (apologies I did give some wrong names for columns originally). But i'm not seeing results in the gallery if the name is in multiple addresses for example if Approver1 has name1@domain.com;name2@domain.com it doesn't recognise that the email address is in that string.
Filter(ChangeMaster, (User().Email in '1stApprover' || User().Email in '2ndApprover') && ((ChangeStatus="Submitted" || ChangeStatus="Approved") && !IsBlank(ChangeStatus)))
Thank you for your help!
Hi @phipps0218 and @NandiniBhagya20
Apologies it is working, it was me being an idiot and not changing it from Approved to 1st Stage Approved in the code. All working fine, thank you both!
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 721 Most Valuable Professional
Michael E. Gernaey 320 Super User 2025 Season 2
Power Platform 1919 268