Afternoon all.
Trying to Filter a datatable but need to go through some finer steps first. The primary idea is to filter the datatable of the users (set by their location) and filtering against the current user / authenticated users permissions as to what locations they are allowed to see.
Collections and fields are listed as below for the important information.
Collection "Users"
Field - uid
Field - CompanyName
Field - CompanyLocation
Field - display_name
Collection "UserPermissions"
Field - uid
Field - LocationFilter
Collection "CompanyLocations"
Field - CompanyName
Field - CompanyLocation
The idea is to check the authenticated user / current user permissions for "LocationFilter" using the authenticated users "Users ID" = "uid" of the collection "UserPermissions"
If the "LocationFilter" = "All Locations"
Filter the results that show on the datatable with
Authenticated user "CompanyName" = Users "CompanyName"
If the "LocationFilter" = "Only location they are based from"
Filter the results that show on the datatable with
Authenticated user "CompanyName" = Users "CompanyName"
Authenticated user "CompanyLocation" = Users "CompanyLocation"
Once these filters are set, the table will populate its fields accordingly.
I am happy to have assistance in many forms
- YouTube videos to explain everything relevant that is easy for me to understand.
- Websites with explanations
- Hints and tips of what to research
- If someone was so kind to write me step by step of what i need to do, that would also be great. ๐
Hopefully once resolved, i will have a better understanding of how this works. As there will be multiple occassions within my app that this kind of filtering will be required with different things other than location and users.