Hi all, my question re AppSheet is, can each ...

Will_Badel
Participant II

Hi all, my question re AppSheet is, can each user I have in my DB only see information related to them and not the entire database?

0 14 357
14 REPLIES 14

Will_Badel
Participant II

@Aleksi_Alkio hi aleksi, sorry to bother again, im not following the security filters code, I have data from two different email users in the googlesheet. i would like only user wbadel79@gmail.com to see wbadel79@gmail.com rows of data. Can you assist with the correct code protocol please?

Yes

Will_Badel
Participant II

Thanks Bellave. Could you briefly explain how that works? Is it basically restricting access based in their email address?

Will_Badel
Participant II

Aleksi, iโ€™ve also tried to make one user or email account the admin, hence they can see and do everything. When i log in with this account i can only see the the data for the corresponding admin email (per the security expression) How can i allow this person to see everything? The 1=1 expression sorry again doesnt make sense to me.

Currently i have this which fetches user data matching the login email which is great [Email]=USEREMAIL()

How would i allow one or two emails to access everything?

if i may, iโ€™ve done this in my tables - I create a user table which contains email, first & last name and company grade (Admin, Team Member, restricted)

Iโ€™ve then created a slice and a new UX view which filters for email=useremail() for any data I want people to only view their own data In the showif component of the views for the everything view i would put: in(โ€œAdminโ€,Select(Users[Grade],[email]=Useremail()))

For the people who are restricted to only their entries - in the UX for that slice: in(โ€œRestrictedโ€,Select(Users[Grade],[email]=Useremail()))

PS: if you have related views, create new virtual columns in the main one and link it to the slice which will give you your related view tables with only their own data

Another approachโ€ฆ if you have only one admin user, you could write the formula like OR([Email]=USEREMAIL(),USEREMAIL()=โ€œadmin@email.comโ€)

Will_Badel
Participant II

Thanks everyone, Iโ€™m very new to all this, appreciate the feedback

Yes, you would have all data in each sheet filtered out based on the userโ€™s email which they will need to use to authenticate. You, as the app creator get to maintain access to the app by adding the emails to the white list which is set in the Users tab of the App Editor.

Will_Badel
Participant II

Thanks Bellave, is there a video tutorial on this anywhere that you know of?

These two articles may help you eitherโ€ฆ

https://help.appsheet.com/security/security-filters/security-filters-the-essentials

help.appsheet.com - Slice Row Filter Conditions Slice Row Filter Conditions help.appsheet.com

You probably have a column [Email] in your table. You can then add a formula like [Email]=USEREMAIL() and that will take care of it. It meansโ€ฆ you only need to write a formula where the result is either TRUE or FALSE. In this case when the user wbadel79@gmail.com is using the app, in his/her row the answer is TRUE and he/she will see it. If the user is somebody else, the answer is FALSE and he/she wonโ€™t see it.

Soโ€ฆ you can write what ever expression you want. The result just need to be TRUE or FALSE. If you type 1=1, everybody can see that record. If you type [Date]=TODAY(), all users will see the record only today if [Date] is today.

Will_Badel
Participant II

thank you aleksi, i believe that has worked for me. i really appreciate your assistance

Youโ€™re welcome

Top Labels in this Space