a!refreshVariable() Function

The configuration for a specific local variable for use within a!localVariables(). When used within an interface, the value of the variable can be refreshed under a variety of conditions. When used outside of an interface, all refresh properties are ignored.

Syntax

a!refreshVariable(value, refreshAlways, refreshInterval, refreshOnReferencedVarChange, refreshOnVarChange)

value: (Any Type) The value of the local variable when it is created and what the variable is set to each time it is refreshed in an interface.

refreshAlways: (Boolean) When true, the value of this local variable will be refreshed after each user interaction and each interval refresh. Because the variable is continually refreshed, you cannot update its value by saving into it. Default: false.

refreshInterval: (Number (Decimal)) How often the variable value gets refreshed in minutes. When null, the variable will not be refreshed on an interval. Because the variable is periodically refreshed, you cannot update its value by saving into it. Valid values: 0.5, 1, 2, 3, 4, 5, 10, 30, 60.

refreshOnReferencedVarChange: (Boolean) When true, the value of this local variable will be refreshed each time the value of any variable it references within the value parameter is updated. To refresh the local variable when another variable that is not used within value changes, use refreshOnVarChange. Default: true.

refreshOnVarChange: (Any Type) Refreshes the value of the local variable each time any of these specific variables change. This allows you to refresh the value when a variable that is not referenced within the value parameter is updated. You can define either using a single variable (e.g. refreshOnVarChange: local!var1) or a list of variables (e.g. refreshOnVarChange: {local!var1, local!var2}).

Returns

Any Type

Notes

For more information about how to use a!localVariables and a!refreshVariable, including detailed examples, see the Local Variables page. The Configuring Refresh Behavior section contains specific information about the different parameters of a!refreshVariable and how to use them.

FEEDBACK