Thank you for your response! I will try to specify!
I want the following security groups / roles for each location:
- Location 1 - Read data (not loan or edit anything)
- Location 1 - Loan/return role (write to the table when doing so, but not have access to edit items)
- Location 1- Add and edit equipment, including the above
- Location 1 - Administrator - All of the above + access to admin panel to add item categories / locations / etc.
- Location 2 - Same as the above, but not allowed to do anything with location 1 (except maybe read data).
- Test / Sandbox - Give groups access to everything besides the admin panel for testing.
I have one table which separates datatype with the following columns:
Example (all in the same table):
DIFFERENT ITEMS:
Location 1 - Equipment - 1 - Headset...
Location 1 - Equipment - 2 - Laptop....
Location 2 - Equipment - 1 - TV.....
Sandbox - Equipment - 1 - TestTest...
LOGS FOR THESE ITEMS:
Location 1 - Log - 1 - Headset - Loaned....
Location 1 - Log - 1 - Headset - Returned..
Location 1 - Log - 1 - Headset - Repaired...
Location 2 - Log - 1 - TV - Loaned ...
Inside the app, you will have a choice of which location you want the app to show data for.
This is a dropdown box which gets its items from this code:
ClearCollect(collectLocation,(Distinct(Filter('Equipment List',DataType = "Location"),Location)));
When the desired Location is chosen, the app will show data only from this location, until you change the location from the dropdown menu.
Each Location have the possibility to have its own categories, departments, etc. These are collected like this:
ClearCollect(collectPossibleDepartment,(Distinct(Filter('Equipment List',DataType = "Department" && Location = myLocation),Department)));
It is by design not possible to change the location for items inside the app.
The Location column is just a normal text column.
Problem 1:
Is it possible to exclude locations you do not have access to from being shown / chosen in the dropdown? That would make things a bit easier?
Problem 2:
How do I make sure that all rows with Location 1 is owned by the Location 1 team? And then a security role with user/team permission will be able to access this data.
This means all data for Location 1: Equipment, logs, categories, departments, etc.
Thank you again for your time! 🙂