Security filter based on groups and not email

Hi,

I have an app for my 4 stores and I am currently using security filters to show users data base off their email. How can I set it up so all of my many tables across the app show information to the users if they are an employee of the particular store that is being shown information for? Using the email as the filter doesnt work well here because I might want multiple users to see certain things and not others.

I already have a table setup called “Employee List” with the following fields:

Name
Location
Email
Manager

The location field identifies which store they belong too

LOOKUP(USEREMAIL(), EmployeeList, Email, Location) = “Hooksett East”

This will work to lock everything in the view to people that work in the location Hooksett East. But this lets the user see all 4 locations as long as they work in Hooksett East.

I do have a location field as well for my tables of data I am talking about

Try this.

[Location] = LOOKUP(USEREMAIL(), EmployeeList, Email, Location)

2 Likes

bob_evan:

How can I set it up so all of my many tables across the app show information to the users if they are an employee of the particular store that is being shown information for?

First I would suggest you build in a Current_User system:

[Current_User (Slice) - How to conform your app around WHO is using the app](https://community.appsheet.com/t/current-user-slice-how-to-conform-your-app-around-who-is-using-the-app/35639) Tips & Tricks ?

One of the core basic functions, included in just about EVERY app I make, is the ability for the app to know WHO is using the app. If the app knows who’s using it, then I can easily control many different aspects of the app: Add/edit/delete permissions How data should be filtered What views are shown What buttons, or Actions, are visible Which workflows should fire off Which columns should be shown or editable etc. Requirements To accomplish this functionality in your app, you need the follo…

Then you can easily pull out the “Location” from that record and use that in your other security filters.

index(Current_User[Location], 1)

PS: This is essentiallly the same as

11179:

[Location] = LOOKUP(USEREMAIL(), EmployeeList, Email, Location)

only the result of that LOOKUP() is stored in the slice.

2 Likes