cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
swetha
Level: Powered On

Disable or Enable '+'/create item button in power apps based on user role in sharepoint

Hi all,

 

Is there a way to show or hide ('+') icon of power apps based on user permission.If user has read role to sharepoint list,and when he opens the power app ,he shouldn't see ('+') icon.Similarly if user has contribute role to list ,he should able to see ('+') icon in app.

 

I have tried the scenario assigning read permisison to a user and tried to create an item(+) , submit an item ,shown access denied

But (+) icon is visible.How to hide this.Any ideas pls suggest.

 

 

5 REPLIES 5
Community Support Team
Community Support Team

Re: Disable or Enable '+'/create item button in power apps based on user role in sharepoint

Hi @swetha,

 

You should be able to modify the Visible property of the ('+') with an If function.

But there is no way available to get the SharePoint user role information currently under PowerApps.

There is User() function which could be available to get the FullNmae, Email or User image property of the current user.

Which we could take use as the If condition.

So a workaround here should be, connecting to an available custom role list, lookup for the User Email, then return the role value:

Formula under the Icon Visible property should be:

If(lookup('Role List', Email=user().email).role=Contribute,
               true,
              false )

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
swetha
Level: Powered On

Re: Disable or Enable '+'/create item button in power apps based on user role in sharepoint

Hi @v-micsh-msft

Thanks for the idea.I will try this in my requirement.

Community Support Team
Community Support Team

Re: Disable or Enable '+'/create item button in power apps based on user role in sharepoint

Hi @swetha,

 

Any update for this issue?

If you need any further help on this topic, please post back.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
swetha
Level: Powered On

Re: Disable or Enable '+'/create item button in power apps based on user role in sharepoint

Hi @v-micsh-msft,

 

I have applied the follwing formula:

If(LookUp(UserRole,UserEmail=User().Email).UserRole="Contribute",true,false) in visible property.But showing an suggestion  near Email  like:

"Part of the look up formula cannot be evaluated remotely due to service limitations.The local evaluation may produce partial results.If possible simplify the formula".

 

Community Support Team
Community Support Team

Re: Disable or Enable '+'/create item button in power apps based on user role in sharepoint

Hi @swetha,

 

That should be related with delegation:

understand delegation

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 347 members 5,263 guests
Please welcome our newest community members: