Restore variables from Local Storage

Description

If enabled, variables that were persisted to Local Storage will be restored when the app is opened. This property is only available when Persist variable values is checked.

Discussion

If variables are persisted to Local Storage, the Restore variables from Local Storage property can be enabled to automatically restore previously saved variable values.

If you prefer more control over the conditions under which variables are restored, you can programmatically restore the values using the {dialog.object}._restoreVariablesFromLocalStorage() JavaScript method.

Related Client-side Events

The following events are triggered when variables are restored from Local Storage:

Event
Description
onRestoreVariablesFromLocalStorage

Fires after variable data has been restored. This event handler can access the e.userData property which was optionally defined when the onBeforePersistControlValuesToLocalStorage event was fired.

localStorageDecryption

Fires after data are read from Local Storage. If data was encrypted using the localStorageEncryption event, you must define code to decrypt the data in this event.