setAttribute

Description

Stores value into an attribute of an object variable in the application's local variable pool.

Input / Parameter

Output

Object

Example

In this example, we will set the value of an object variable's attribute and check whether the variable attribute has been set successfully in the console.

Steps

  1. Drag the function Variable.setAttribute into the event flow window.

  2. Create a variable called vObject with the attribute name that has value Johnny.

  3. This will create a global variable called vObject (if it doesn't exist already) with attribute name containing the value Johnny that can be accessed by other components or on other pages of your app.

Result

  1. The value of the attribute name of the global variable vObject can be accessed by using the Variable.getAttribute.

  2. Using the above flow will display the value Johnny in the browser console.

See also

Last updated