Notification

The AppSheet Help Center documentation can now be viewed in Japanese - AppSheet ヘルプセンターのドキュメントが日本語で表示できるようになりました。. Learn more

Limit users to their own data

When you use security filters, you typically:

  • Require user sign-in. After a user signs in, AppSheet knows the user's email address. You can then use the user's email address to filter the data shown to that user.
  • Include a field in each record that identifies the owner of the record. Typically this field contains the owner's email address. When adding a new record to a table, you can use the USEREMAIL() function in that field's Initial Value property to initialize it with the user's email address.

Security filters are optional Yes/No expressions associated with each table in the app. They typically use the user's email address, and possibly other data values, to limit the data shown to the app user. 

To limit access by user email:

[EmailColumn] = USEREMAIL()

To limit access by user email domain:

CONTAINS(USEREMAIL(), [EmailDomainColumn])

To limit access by user email but allow any manager to have access, create a Managers table that contains the email addresses of all managers. Then specify a security filter like:

OR(IN(USEREMAIL(), Managers[Email]), USEREMAIL() = [EmailColumn])

To filter based on the Department name contained in the Employees table. The security filter would be:

IN(LOOKUP(USEREMAIL(), Employees, Email, Department), LIST("Payroll","Personnel"))

To filter the Customers table so that each sales representative sees only their own customers. If you have a separate CustomersToReps lookup table having columns CustomerId and SalesRepEmail, the security filter for the Customers table would be:

IN([CustomerId], SELECT(CustomersToReps[CustomerId], [SalesRepEmail] = USEREMAIL()))

See also: Scale using security filters

Was this helpful?

How can we improve it?

Need more help?

Try these next steps:

Search
Clear search
Close search
Main menu
16725290896877081541
true
Search Help Center
true
true
true
false
false