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 / update context and res...
Power Apps
Unanswered

update context and restrict the records that appear based on user

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I am a HRBP and I would love to create an app to help us with the automation of our processes especially wrt the people we partner. Would like to know how to create a function that only let's people matched to a certain HRBP show on the list.

 

E.g we have an excel sheet with a long list of name and on another column have the names of 3 HRBPs matched to all those names. Let's say the HRBPs are Jane, Joe and Ada . I want a situation whereby when Jan signs into the app, she only sees the names that she has been assigned and same for other HRBPs. How do I go about this?

 

Cheers,

 

Categories:
  • Meneghino Profile Picture
    6,949 on at
    You can use the User() function to identify the current user and then filter the list by using the Filter function.
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi thank you for your reply. please where do I put this function? on the screen that generates the list of employees or on the additional screen I create for signing into the app? or since it's powerapps is there any need to have an additional sign in thing? it's all confusing. Thank you.

     

    Cheers,

  • Meneghino Profile Picture
    6,949 on at

    It is confusing at the beginning.  Let's take it step by step.

    Do you have a gallery that shows the list of employees on the "screen that generates the list of employees"?

    If so, what is currently the gallery's Items property?

  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi Aj01,

     

    >You could create separate sheets for each HRBP in Excel. Then format the sheets as table.
    >Create a connection to the tables, add three screens for each HRBP, set the data source to each table.
    >On Screen1, add a Button, set its OnSelect property as:
    If(User().FullName="Jane",Navigate(Screen2,ScreenTransition.Fade),User().FullName="Joe",Navigate(Screen3,ScreenTransition.Fade),User().FullName="Ada",Navigate(Screen4,ScreenTransition.Fade)

     

    If you don’t know the correct user name, please add a Text box control, and set its Text property as: User().FullName to get it.

     

    Please feel free reply if you need more help.

     

    Best regards,
    Mabel Mao

  • leyburn19 Profile Picture
    2,157 on at
    I found a way based on login name or email. When you open the app rhe galley selects only the records based on your filter. Eg filter(table, email1=user().email)

    Wher email1 is a column in your table. You can do the same for user name.name=user().fullname
  • leyburn19 Profile Picture
    2,157 on at
    I should add this is in the items property to the gallery

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 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard