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 / Filter according to th...
Power Apps
Unanswered

Filter according to the logged-in user

(0) ShareShare
ReportReport
Posted on by 143

Hello
I have a gallery that I want to filter if it is a user of my sharepoint list so that he can only see the information or appears his mail pro

 

If(HRManagerEmail = User().Email;Sort(BdMs_New;Nom;Ascending);Filter(BdMs_New;'Email pro'=User().Email))

 

 but at the same time I want the emails filled in in my variable userManager and HRManagerEmail in onstart of the app can see all the records.

 

Set(
 _requestTypeFilter;
 "All"
);;
Set(
 MusarUserEmail;
 User().Email
);;
Set(
 userManager;
 Office365Users.ManagerV2(userEmail)
);;
Set(
 HRManagerEmail;
 "jacques.donzel-gargand@sdis74.fr"
);;

 

 

Hoping to put made understand 😁

 

Categories:
I have the same question (0)
  • ElizabethK Profile Picture
    129 on at

    If I am understanding you correctly, I  might suggest adding a filter icon to toggle on and off. 

     

    StepAction
    1Insert Icon
    2Choose the icon you want to represent the filter (there is a funnel icon that I have used)
    3Click on the icon and go to the "OnSelect" property
    4

    OnSelect: UpdateContext(FilterMode: !FilterMode}) 

    *in this case I am naming the variable "FilterMode" - you can name it whatever you want.

    5

    Color: If(FilterMode, Navy, DimGrey) 

    * this is saying if filter mode is on, the icon is navy, if it is not on, the color is DimGrey - you can choose any colors you would like)

    6

    Click on the gallery that houses your data set

    7

    Select the "Items" property

    8

    Items: Filter('Name of Data Source', If(FilterMode,Upper(CREATEDBY.Email)=Upper(User().Email),true))

     

    *note the createdby text I suggest is whatever column you have that reveals that the item in the list is assigned to that user name, so for example in one of my apps - this column is called Assigned.  

     

    I am not sure if this will help you, but it's an idea! 

  • Fa1con74 Profile Picture
    143 on at

    Hello
    There is apparently an error in 

    UpdateContext(FilterMode:!FilterMode})

    Fa1con74_0-1641925419624.png

    And being rather beginner I do not see

     

  • ElizabethK Profile Picture
    129 on at

    The mistake is mine, please add an additional bracket like this:

    UpdateContext({FilterMode:!FilterMode})

  • Fa1con74 Profile Picture
    143 on at

    Hello
    I tried your sollution but unless I am mistaken, it is not exactly what I am looking for.
    I want the user who opens the "Homescreen" screen to see in the "galHome1" gallery only the registration corresponding to his email address.
    Knowing that in my sharepoint list there is an Email Pro column or is filled in the mail pro of the agents who connect.

  • ElizabethK Profile Picture
    129 on at

    I am very sorry, I did not have the time to research this today to put it into a chart to help you, but I did find this you tube that may assist:

    https://www.youtube.com/watch?v=wG48z1V_c7o 

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 396 Most Valuable Professional

#2
11manish Profile Picture

11manish 134 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 101 Super User 2026 Season 2

Last 30 days Overall leaderboard