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

    set

    • Dark
    • 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");
    JavaScript
    // assign value to object named 'firstName'
    app.set("firstName", "Marshall");
    JavaScript
    // assign value to object named 'pressure'
    app.set("pressure", 32.64);
    JavaScript
    // 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);
    JavaScript

    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