- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Description
Sets a specified app object's current value.
Input Parameters
Name | Type | Required | Description |
---|---|---|---|
tokenOrName | Text | Yes | Target object token or name |
value | Any | Yes | Value(s) to assign to object |
[reset] | Boolean | No | Resets all other values when applicable (Default = true) |
Returns
No return value.
Examples
// assign value to object [10]
app.set("[10]", "Green");
// assign value to object named 'firstName'
app.set("firstName", "Marshall");
// assign value to object named 'pressure'
app.set("pressure", 32.64);
// assign multiple values to object named 'favColors'
// multiple values are separated using the pipe '|' character
// instruct no reset so any existing values are preserved
app.set("favColors", "Blue|Green", false);
Remarks
For object types that support it, multiple values are separated using the pipe '|' character between each value.
Token Syntax
This function uses the native app object token syntax, which refers to the ID of an object within your app that is enclosed in square brackets.
Example: [10]