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 disable a butto...
Power Apps
Answered

How to disable a button based on user

(0) ShareShare
ReportReport
Posted on by

Hello all, I am new to Power Apps and trying to design a Contacts List

I have the + button added in top right corner of app

I want to disable that based on if the user is any one else besides me or any one else I invite as admin

If(DataSourceInfo([@Contacts], DataSourceInfo.CreatePermission), DisplayMode.Edit, DisplayMode.Disabled) is the current code

 

Mistaavi_0-1641753984438.png

 

  • Ram Prakash Duraisamy Profile Picture
    5,891 Super User 2026 Season 1 on at

    Hello @Mistaavi,

     

    May i know what's your Back End?

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

    Hi @Mistaavi,

    Have you solved your problem?

    Do you want to check if the current user is admin?

    Could you please tell me more about your data source?

     

    Actually, the DataSourceInfo.CreatePermission checks if the current user has permission to create records in this data source and it returns true if the current user has permission.

    In addition, permissions checking with DataSourceInfo is only possible when using Microsoft Dataverse.

     

    So combine with your condition, you could try the following formula:

    If(DataSourceInfo([@Contacts], DataSourceInfo.CreatePermission) || 
     User().Mail=Office365Users.MyProfileV2().mail, 
     DisplayMode.Edit, 
     DisplayMode.Disabled
    ) 

     

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 312

#3
Mohsin Ali Profile Picture

Mohsin Ali 252

Last 30 days Overall leaderboard