cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Veblitz
Post Prodigy
Post Prodigy

Button visibility based on sharepoint user groups

 

I used below steps to handle visibility to admin button but im not sure how to check for the users button as i have added the same steps to check for users group as well but its only working for only admin or only users .

 

I need help in order to check Admin and users using filter property formula for the below steps in onstart property.

 

Security is my sharepoint list where i added items and gave unique permission for my security list items

Please refer the security list items

 

Veblitz_3-1669053381621.png

Admin Item ->Manage access->unique item level permission->Admin sharepoint group

Veblitz_5-1669053631472.png

 

Veblitz_4-1669053517033.png

 

Veblitz_0-1669052924217.png

Veblitz_1-1669052988847.png

Veblitz_2-1669053200690.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
NurSabrina24
Helper III
Helper III

Instead of OnStart properties, I change it to Visible for each button with this function:

LookUp('People and Groups', User().Email = Email, If('User Type' = "Admin", false, true)) - this is for Visible properties of User button

NurSabrina24_0-1669360915094.png

And for Visible properties of Admin button would be: 

LookUp('People and Groups', User().Email = Email, If('User Type' = "Admin", true, false))

Note: I change it to LookUp instead of Filter functions

 

Hope this helps a little.

 

View solution in original post

10 REPLIES 10
v-jefferni
Community Support
Community Support

Hi @Veblitz ,

 

Do you want the admin button to be visible for admin while the users button to be visible for users group except the admin?

In other words, anyone can only see a button?

 

If so, you could try as below:

vjefferni_0-1669104632653.png

 

Best regards,

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Veblitz
Post Prodigy
Post Prodigy

Thanks for the suggestions

 

My requirement is

1)if my user ID got access in Admin sharepoint group then Admin button should be visible in powerapps form and if i do not have access in admin sharepoint group then Admin button should be hided,

 

2)same way if my user ID got access in users sharepoint group then users button should be visible otherwise users button is hided

 

unfortunately, im facing below issue that is i removed my access in Admin groups and users group but still its showing Admin buttons

 

Admin users list

 

Veblitz_0-1669111002248.png

User sharepoint group

Veblitz_1-1669111041254.png

 

 

I tried removing myself in both the Admin and users  sharepoint group(pls check above) but still Admin  button is visible but it should not display as i do not have access in admin group and please help in this scenario.

 

I copied the formula as per your inputs

 

Veblitz_5-1669111615651.png

 

 

Veblitz_3-1669111446336.png

 

 

Veblitz_2-1669111349751.png

 

 

 

Veblitz
Post Prodigy
Post Prodigy

I kindly followup and appreciate kind help for the same.Thanks in advance.

Veblitz
Post Prodigy
Post Prodigy

I kindly follow up and appreciate kind support

Veblitz
Post Prodigy
Post Prodigy

Appreciate kind help and thanks in advacne

NurSabrina24
Helper III
Helper III

I assume you have refresh your sp list in your powerapps?

From my opinion, you can try to combine both in the same list and add a column name user type for example and determine if the user is admin or user. And you can include a Filter-If function where you will filter the SP list with conditions User().Email = <email column status> and then with If functions for the user type column to set btn visible. 

 

 

 

Hope this helps you. I haven't tried the way you did, but this is according to what I have used for this. 

 

Thank you.

Yes i managed to refresh but unfortunately the formula does not work exactly as expected in any of the probability

I request you to please share me the steps hence it would be helpful since i am newbie

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,173)