cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mangjun
Frequent Visitor

How to filter gallery If current logged user email is part of the global variable

Hello,   I am having a challenge on filtering my gallery to show specific records, based on the current logged user if it is a  member of one of the global variable.  Below code is from the OnStart property of the App where I have declared th global variable.

 

The logic is, based on the current logged user, if its a member of any group below, corresponding records for each group should be filtered (i.e. if isGroup1, records filtered will be those that contains a value "For Group1" and if member of isGroup2 filtered records that contains value "For Group2" and so on so forth.

Set(
    isGroup1,
    User().Email in [
        "group1user1@email.com",
        "group1user2@email.com",
        "group1user3@email.com"
    ]
);
Set(
    isGroup2,
    User().Email in [
        "group2user2@email.com",
        "group2user2@email.com
    ]
)

 

In same logic, I want to change a Mode property of a text input field to "Password" if current logged user is not a member of global variable (isGroup1 or isGroup2) and record field value does not match (For Group1 or For Group2).  Below is the current code inside the Mode property of text input field

 

If(isGroup1 && ThisItem.Assignment="For Group1",TextMode.SingleLine, Password)

 

Any assistance is highly appreciated.  Thanks.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
mangjun
Frequent Visitor

Hello,  I have sorted it out...Thanks.

View solution in original post

2 REPLIES 2
mangjun
Frequent Visitor

Hello,  I have sorted it out...Thanks.

Hi @mangjun

Glad that you have resolved your problem.

Could you please mark your reply as an answer?

Thanks for your cooperation.

Best Regards,
Qi

Helpful resources

Announcements
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.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,101)