web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to filter gallery ...
Power Apps
Answered

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

(0) ShareShare
ReportReport
Posted on by 27

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.

 

 

 

 

Categories:
  • Verified answer
    mangjun Profile Picture
    27 on at

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

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @mangjun

    Glad that you have resolved your problem.

    Could you please mark your reply as an answer?

    Thanks for your cooperation.

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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard