Reputation: 557
I am trying to edit my app in a way such that the user can only see and edit their own records. I am trying to do this within the app itself and not the list.
As I list I am aware I can restrict permissions. But I am trying to do this in the app.
I need to restrict but user().Email
as I use this in a "Created by" field.
How can I restrict my "BrowseScreen" by user id?
Thanks.
Upvotes: 1
Views: 1099
Reputation: 308
You can create a browser navigation screen to restrict screen viewing: If(User().Email="[email protected]" Or "[email protected]",TabNavigation,Filter(TabNavigation,ID=1 Or ID=2 Or ID=3))
You would need to create a collection for the navigation. Then have it appear in a gallery using the functions above. Here is how to create a collection for this: ClearCollect(TabNavigation,{ID:1,Tab:"Product Name"},{ID:2,Tab:"Description"},{ID:3,Tab:"Filters"},{ID:4,Tab:"Pricing"})
You can also filter the database you're using by the created by column.
And if you need a more advanced auto manged one. You can create a user list and assign permissions like so.
UserName | IsAdmin | IsSalesManager |
---|---|---|
John | true | true |
Tate | false | true |
Dummy | false | false |
Then you can set your navigation to only show the nav options based on user permission.
Upvotes: 2