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 / Dinamic data-tables de...
Power Apps
Answered

Dinamic data-tables depending on the User(): different data for different Users

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Dears,

 

I've been creating an App to run the salary review process on a global scale, upgrading from Excel templates.

 

Scenario: I have 20 Managers, for each one I have an Excel template (data-table for the App) listing their direct reports and a bunch of information (current salary, hire date etc.).

The App will allow them to see the information of their subordinates and update their salary information.

My only little, gigantic problem is that I need to change the referenced data-table on the basis of the User().

 

I created a log-in page as a starting point, now I basically need to link the password (or the User itself) to the relevant data-table, this is critical.

 

You think this might be doable in PowerApps?

 

Thank you!!!

 

Categories:
  • Verified answer
    KRider Profile Picture
    577 Super User 2024 Season 1 on at

    Yes this is absolutely doable. You can use Office365Users.MyProfileV2().displayName or

    Office365Users.MyProfileV2().mail (This gets their email). 

     

    You could either create a dropdown with your 20 managers to sort based on the dropdown.Selected.Value

    or just read from the Office265Users to display the information. Hope this helps.

  • MVP-Phipps Profile Picture
    3,526 Super User 2024 Season 1 on at

    Yes you can link the user to the data if you have this as a field in the datasource. Then based on the logged in user you filter the data coming into the app.

     

    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful because this can help others.

    LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
    YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
    Twitter: https://twitter.com/phipps0218

  • Verified answer
    Masino Profile Picture
    321 on at

    Sure,
    You can use both 

    Office365Users.MyProfileV2().displayName or Office365Users.MyProfileV2().mail, depending on your needs.

    or even better,

     

    user().fullname or user().email


    So you can hide some sections of your program based on who is logged in 😉 


    example... OnVisible= If(user().mail='your@contact.email'; true;false

     

    and so on

  • MVP-Phipps Profile Picture
    3,526 Super User 2024 Season 1 on at

    It is always best to use email rather than full name because names can have discrepancies. Especially with case sensitive. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you guys!

     

    This is great.

    Just one doubt: I don't need to hide/get visible some parts of the App, the UX should always remain the same, what changes is the data feeding Galleries, Lables and so on. 

     

    Managers are basically supposed to:

    Scroll their subordinates (Gallery)

    View their Information (View Form)

    Edit the Salary (Edit Form)

     

    This is why I have 20 different Excel files which I should import in the App. Do you confirm I can filter Galleries and Forms by Office365Users.MyProfileV2()?

  • Masino Profile Picture
    321 on at

    ..Never, never, never use excel as a database. Better to use a list in Sharepoint at this point!
     But,....

    "This is why I have 20 different Excel files which I should import in the App. Do you confirm I can filter Galleries and Forms by Office365Users.MyProfileV2()?"

     

    Yes you could, but shouldn't 😛

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    **bleep** right,

     

    Unfortunately the Excel spreadsheet comes from another department and they want to keep using them. 

    So I'm finding the best way to use them as database but at least improving the manager's user experience.

     

    Thank you 10000!!!

  • KRider Profile Picture
    577 Super User 2024 Season 1 on at

    Why isn't this a good option? Just curious as I have used it to separate what Team Leaders and Managers can see? Still learning the finer workings of Power Apps I guess. hahaha

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

#2
WarrenBelz Profile Picture

WarrenBelz 191 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 167

Last 30 days Overall leaderboard