How to set up that 1 user only see his own data as well as that me as the admin have access to all the data of all users?

Hello,

for my Purpose, i just want that my user can only see his own data and not of other users and that i as the the admin can see it too.

What has to be the Formula then in the security filter and which tables do i need?

Would the this Formula be a mix of โ€žIN([CustomerId], SELECT(CustomersToReps[CustomerId], [SalesRepEmail] = USEREMAIL())โ€œ and โ€žOR(IN(USEREMAIL(), Managers[Email]), USEREMAIL() = [EmailColumn])โ€œ ?

Would be awesome when you can help me with that and hope itโ€™s not too much work

Kind regards!

Screenshot (887)|690x113

Solved Solved
0 3 1,679
1 ACCEPTED SOLUTION

For the table that the security filter applies to, add a column in your data for Creator. In Appsheet, set the Initial Value of that column to USEREMAIL().

In the security filter the expression to retrieve only the data the user created would be:

USEREMAIL()=[Creator]

If you desired for the Admin to manipulate the same data but also must be done in same app, then add:

IF(USERROLE()=โ€œAdminโ€,
TRUE,
USEREMAIL()=[Creator])

If you must have defined positions (like User, Manager, Admin) them having one User table with different values in the [Position] column would be easiest.

I hope that is all you need, although it is not exactly what is being described in the screenshot.

View solution in original post

3 REPLIES 3

For the table that the security filter applies to, add a column in your data for Creator. In Appsheet, set the Initial Value of that column to USEREMAIL().

In the security filter the expression to retrieve only the data the user created would be:

USEREMAIL()=[Creator]

If you desired for the Admin to manipulate the same data but also must be done in same app, then add:

IF(USERROLE()=โ€œAdminโ€,
TRUE,
USEREMAIL()=[Creator])

If you must have defined positions (like User, Manager, Admin) them having one User table with different values in the [Position] column would be easiest.

I hope that is all you need, although it is not exactly what is being described in the screenshot.

thx a lot

Do you maybe know where i can overview all the data that each of my users put into my forms? so that there is like a dashboard that i can see which user has created which data?

Thx in advance

Steve
Platinum 4
Platinum 4
Top Labels in this Space