Filter Map and Table by User Selection

I have been searching through the help areas for a while and am struggling to find a concise answer.

I have a list of company locations across the US which includes a โ€˜Stateโ€™ column. I want the user to be able to select their surrounding few states and have the map and table filter the original data to just those states. I did find an article which showed me how to use User Settings and EnumList but I canโ€™t figure out how to have the selected states reflected in the map pins or the table. (https://help.appsheet.com/en/articles/901334-user-settings-the-essentials)

Thanks

0 3 617
3 REPLIES 3

Looks like you are almost there!

The next step is to create a security filter for each table. This can be found under Security -> Security Filters. You would put this formula in the tables you want filtered.

in([State], usersettings(USERSTATES))

where

USERSTATES is the field created in usersettings
and [State] is the column in your table that defines the state that the record is associated with.

This formula tells AppSheets to read the value of a records [State] column and if that value is in the userโ€™s list of states then include that record from the table, if not then hide the record.

Thanks for the quick response. Forgive my ignorance but Iโ€™m just getting started with AppSheet.

I donโ€™t understand what you mean by โ€œUSERSTATES is the field created in usersettingsโ€
Iโ€™m getting the following;
Error in expression โ€˜[_THISUSER].[USERSTATES]โ€™ : Unable to find column โ€˜USERSTATESโ€™

Steve
Platinum 4
Platinum 4

Or slice.


Rich is suggesting you reconfigure one of the existing user settings columns by naming it USERSTATES. Use that column to capture your EnumList.

Top Labels in this Space