cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Johnathon_S
Advocate II
Advocate II

Show/Hide based on permissions

I want to hide a button based on user permission. I thought it would be as simple as setting the Visible property to a formula that evaluates to a boolean. Yet, the formula I am using always returns true. Can anyone help me understand what is happening?

 

Visible = DataSourceInfo(ECTCR_Tracking, DataSourceInfo.EditPermission)

 

After that is a set I test the functionality with an account that only has read permissions, yet that button still shows up. Is this a bug?

2 REPLIES 2
Anonymous
Not applicable

Hi @Johnathon_S

 

What data source are you using?

 

From the documentaton on DataSourceInfo.EditPermission:

Does the current user have permission to edit records in this data source? If not set by the data source, returns true.

It might be that your data source simply does not returin this parameter and it defaults to true.

SharePoint.

 

It would be really nice if I could get something like disabling a button based on permission to work. 

 

Example:

 

DisplayMode = If(DataSourceInfo(ECTCR_Tracking, DataSourceInfo.EditPermission) = true, DisplayMode.Edit, DisplayMode.Disabled)

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (1,493)