Device Level Local Variables

pmansy
New Member

Add device level local variables to allow user to select options without the need to save the parameters in the cloud. Example: filtering a slice based on some parameters selected at the device level, currently requires saving the parameters in the cloud. It would be much simpler if the parameters could be saved at the device level.

Status Open
2 10 1,004
10 Comments
LeventK
Silver 5
Silver 5

Do you mind using USERSETTINGS() feature for that as its a device specific property?



pmansy
New Member

I am using user settings, but it cannot be changed by an action, it can only be changed from the settings view automatically created by Appsheet. I need local variables that can be changed by an action.

LeventK
Silver 5
Silver 5

Then why don’t you create a Variables table for your own? You can change the variable values with actions, DataChange workflow and event with preset AppSheet API thru Webhook Workflow.

pmansy
New Member

I do, but it is complex. Example: filter one customer in a customer table. With local variables, I would write the selected customer ID in the local variable and filter on the local variable. Without local variables, I have to create a table with the list of users, create a column for the customer selection, write the selected customer ID in that column for the user currently logged in on the device, select query that table on the logged user, and use the result to filter the customer table. Complex for a simple filter and what if I want to see different customers on different devices logged to the same user? Local variables would greatly simplify this operation.

LeventK
Silver 5
Silver 5

As I have specified in the beginning, you can use USERSETTINGS. This way or the other, you need an operation to change the value of that local variable and it’s not different than opening the settings under the hamburger menu and changing it. If you don’t want to mess with it, you can make your local variables table a Detail UX and set your variables as quick edit columns on that detail view so that they can be changed dynamically. If you want to assign multiple users to any local variable, you can set that table as a REF to your USERS table and you can filter that Detail UX as well. It’s not that complicated.

Bahbus
New Member

Depending on your plan tier, you could make your local variables table private, which would make it act like USERSETTINGS and you can use actions to change data and such.

pmansy
New Member

Yes, I considered that option, but it is not my first choice, because modification of the structure of a private table if needed is tricky. But yes, it is a potential solution.

pmansy
New Member

Yes, but local variables that can be changed from actions would bring much flexibility and simplification. All it would take is to allow USERSETTINGS to be changed from actions. That would be great! Thank you!

Bahbus
New Member

Make it a simple 2 column setup: [VARIABLE NAME] as your key column and [VALUE] as an enum to hold your value. If you need new variables, you just add rows, ensuring the structure never changes.

Status changed to: Open
Pratyusha
Community Manager
Community Manager