set
  • 09 Apr 2021
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

set

  • Dark
    Light
  • PDF

Article Summary

Description

Sets a specified app object's current value.


Input Parameters

NameTypeRequiredDescription
tokenOrNameTextYesTarget object token or name
valueAnyYesValue(s) to assign to object
[reset]BooleanNoResets 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]


What's Next