MENU
    load
    • 26 Oct 2020
    • 1 Minute to read
    • Contributors
    • Dark
    • PDF

    load

    • Dark
    • PDF

    Article summary

    Description

    Loads multiple app object values from a single passed object.

    Each property name of the passed object must correspond to an object name that belongs to your app. The corresponding values will be set as the values for each specified app object.


    Input Parameters

    NameTypeRequiredDescription
    objectJsonYesJson object with target name-value pairs

    Returns

    No return value.


    Examples

    // define a single object with multiple target values
    // your app must have objects with the names of each property
    var defaults = {
        "firstName": "Ben",
        "age": 25,
        "favColor": "Blue",
        "likesPizza": true
    };
    
    // load all values
    app.load(defaults);
    JavaScript

    Remarks

    One common use for this function is to load a set of default values for your app when it first loads, using the Ux.Initialize app script.


    What's Next