I fear the subject is a bit misleading. Let me explain…
I have a user table with a field for “HomeOffice” for our different offices. Each user has only one location. Most people will only need to/want to search people within their location, however, they may want to search against all users at times.
I have a page showing the user table records. It lists all users in all locations. You can use the “add filters” to limit your view to only people in your office. Is there a way to pre-create a filter (not using the filter tabs but a custom filter) to only show users in the current user’s location? I’d like to do it this way because I have other filters I want to set in the “filter tabs”.
I just noticed the tabs at the top also spell “ATL” that’s a coincidence! I’m interested in automatically creating a filter such as “HomeOffice=ATL” but it needs to be created dynamically based on the logged in user’s HomeOffice location.
Is this possible?
Did you try the filter tabs? They work they way you are wanting.
Once you turn them on, you would just add your criteria, such as Location is Atlanta.
The name at the top left is what shows on the tab.
Yes, I tried the filter tabs. In fact, in the attached screenshot, you can see I set up three tabs: A, T, and L. Those tabs are for specific filters that each location would want to run. I would like to set up these other filters for the current home office for each group, so that by default it only shows you the people in your office but removing the filter will allow you to see everyone regardless of location.
If I use the filter tabs, I’d need to set up location specific versions for each filter. Instead of A, T, and L, I’d need something like: A-ATL, T-ATL, L-ATL, A-PHX, L-PHX, T-PHX, etc. So I’d need 3 times the number of locations, and it would looks like a disaster.
I might be able to use a pipe to preset it, or I might be able to use the Builder API when that comes out. Other than those options, I can’t think of a good way to do it.
If these locations have a connection to a user, you should be able to create a filter that only shows Locations connected to logged in user. I’m assuming that’s not the case, espcially since that wouldn’t be the best way to build the connections. (More like a user belongs to a location, not location belonging to a user).
I don’t think there’s any way to do what you’re looking to do aside from creating another table and filtering the records in the Data Source tab.
If you can show the connection diagram of your data it might help so I can see exactly how the data relates to each other and I can try and advise futher.
We don’t have a lot of locations so currently, it’s just a “Select” field on the Users DB.
It’s a shame I can’t leverage the app/user variables to use in a query. For example, save the current user’s location to a variable, then filter all users based on their location being equal to the user variable.