JavaScript

{dialog.object}persistVariablesToLocalStorage Method

Syntax

{dialog.object}.persistVariablesToLocalStorage([variables]);

Arguments

variablesJSON Object

A JSON Object containing variables to persist to local storage in addition to the values stored in controls in the UX Component. Can have the following properties:

userDataJSON Object

A JSON Object containing data to persist to local storage.

Description

Stores information in Local Storage.

Discussion

Manually persist variables to local storage in the UX Component. All variables in the UX component will be saved to local storage when this method is called. You can specify additional variables and values to store as a JSON object passed to the function.

This method is only available when Persist variable values is enabled. To store an item to local storage without using Persist variable values, use localStorage.setItem().

Example

var data = {};
data.userData = [];
data.userData.push({"value1":1});
data.userData.push({"value2":2});
data.userData.push({"value3":[1,2,3]});

{dialog.object}.persistVariablesToLocalStorage(data);

See Also