cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Deny users to navigate

Good morning everyone,

 

I am working on a Power App where I have two different sharepoint lists set up.  There are different groups for each one.  I am wanting to have a main page where the different groups can go to do sign ups.  I want the individuals in the green group only to be able to go to the green group page, if they are in the Red group they will not be allowed to  navigate to the green group sign up.  Conversely if they are in the green group they will not be able to go to the red group sign up page.  I have two different sharepoint lists and groups set up with staff assigned to each of their teams.  Is there a way in Power apps to deny navigation based on sharepoint grouping? 
Thank you

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Deny users to navigate

Create a Table OnStart of Your App (You can also use your Existing Table):
Set( UserTable,
Table({ EmailAddress: "sss@aa.com", Name: "RR", GroupName: "A"},
{ EmailAddress: "kss@aa.com", Name: "PP", GroupName: "B" },
{EmailAddress: "uu@aa.com", Name: "LL7", GroupName: "C"}
))
 
Then do a Variable OnVisible or also OnStart of the App to lookup the User GroupName:
Set(VarMyGroupName,LookUp(UserTable,EmailAddress=User().Email,GroupName))
 
Finally, in Visible of the Navigation buttons:
If(VarMyGroupName="A",true,false)
 
Another Button:
If(VarMyGroupName="B",true,false)
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

1 REPLY 1
Highlighted
Community Champion
Community Champion

Re: Deny users to navigate

Create a Table OnStart of Your App (You can also use your Existing Table):
Set( UserTable,
Table({ EmailAddress: "sss@aa.com", Name: "RR", GroupName: "A"},
{ EmailAddress: "kss@aa.com", Name: "PP", GroupName: "B" },
{EmailAddress: "uu@aa.com", Name: "LL7", GroupName: "C"}
))
 
Then do a Variable OnVisible or also OnStart of the App to lookup the User GroupName:
Set(VarMyGroupName,LookUp(UserTable,EmailAddress=User().Email,GroupName))
 
Finally, in Visible of the Navigation buttons:
If(VarMyGroupName="A",true,false)
 
Another Button:
If(VarMyGroupName="B",true,false)
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (6,868)