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 / Modern Driven App - Sh...
Power Apps
Suggested Answer

Modern Driven App - Show/Hide button visibiblity using security role FX formulae

(3) ShareShare
ReportReport
Posted on by 2
Hi,
 
Please advise, the FX query to show/hide the button of modern driven app  specific to security role.
 
Categories:
I have the same question (0)
  • Suggested answer
    MS.Ragavendar Profile Picture
    6,334 Super User 2026 Season 1 on at
     
    1) Instead of DatasourceInfo, use a direct check against the user's role.
    2) Fetch the Securityroles table to verify if the logged-in user has the "Manager" role.
    3) Set the button’s Visible property accordingly.
     
    If(
        LookUp(
            SecurityRoles,
            Name = "Manager" && User().Email in Users.Email
        ),
        true,
        false
    )
     
    Similar Article
     
     

    Modify the Visible property of your buttons with this Power Fx formula:
    🏷️ Please tag me @MS.Ragavendar if you still have any queries related to the solution or issue persists.
    ✅ Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
  • ronaldwalcott Profile Picture
    3,862 Moderator on at
    You did not indicate the type of app canvas or model driven. In the case of canvas the type of data source as there isn't a built-in solution for security roles.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard