Manipulate default app variable value

I don’t know if it’s possible but at least in LTS 11 we can´t.

It would be nice to be able to manipulate/change the default value for an app variable.

Our use case is related to app variables used to filter data on table widgets. These filters get cleared every time we do an app completion. Users would appreciate that these filters remain as the set them up before the app completion was executed.

Hey Mario,

If I am understanding you correctly-- it sounds like you want to store state attached to the User and/or the Station. While this isn’t the easiest thing to do, it’s going to come up again so I recommend you try setting something like this up. It is a very useful pattern.

Configure a column in your Users table for the specific filter or filters you would like to use. Then, inside of your app, add three triggers on the App pane.

  1. On App Enter - Load the User record based on the current active user then load the latest value into the filter variable
  2. On App Close - Store the current value of the variable in the user record
  3. On App Cancel - Store the current value of the variable in the user record

This way, the value will be connected to the User.

You can apply this exact same pattern to a Station table, although that will have to be custom created since there is no default Station table.

Let me know if you have any questions.

Hey Mario! I wanted to follow up as I was going through our production suggestions. I believe what you are hoping to achieve is possible.

You should be able to manage your variables by accessing them in the App tab of your app editor.

This should open the variable management modal which has a default value column. You should be able to change the default values. Additionally, under the three dot menu, you can configure which variables clear on completion.

I hope this helps! Let me know if this doesn’t achieve what you are looking for.

1 Like