cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerappsMax
Helper III
Helper III

Conditional based viewing in gallery

Hello, I have a gallery that I need to filter based on certain groups of people. Normally for something like this, it would be on a person-to-person basis and I could hardcode emails/usernames to dictate who saw what. However, this project will be more dynamic. Below is some information on my project/problem. 

 

I have a gallery that shows approvals. On each record displayed there is a "current_approver" column. This changes as the record move through its approval. Instead of the current approver being "someone@domain.com" its a group of people. So a record might look like an example below:

 

TitleTypecurrent_approverTimestamp
Approval Record Group 1 

 

What I am thinking of is having an SP list called "Group One Approvers" and entering the names and email addresses of all users that are considered a "Group 1 " Approver. 

 

I am unsure of how to add filtering for this and have it be accurate. Would it be using the "in" function and checking if the email is in a column? Would that be accurate enough?

 

Please let me know if anyone has any insight on a solution and thank you in advance!

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @PowerappsMax ,

You could have a list with both the group and email in two fields, then 

If(
   !IsBlank(
      LookUp(
         YourListName,
         YourGroupField = ThisItem.current_approver &&
         YourEMailField = User().Email
      )
   ),
   DoYourApprovedAction,
   DoYourUnapprovedAction
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

View solution in original post

1 REPLY 1
WarrenBelz
Super User
Super User

Hi @PowerappsMax ,

You could have a list with both the group and email in two fields, then 

If(
   !IsBlank(
      LookUp(
         YourListName,
         YourGroupField = ThisItem.current_approver &&
         YourEMailField = User().Email
      )
   ),
   DoYourApprovedAction,
   DoYourUnapprovedAction
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (5,394)