LinkedIn
Copied!

Table of Contents

Set value UI action in DX API

The Set value action assigns a source value to a target property in the UI. Learn about the JSON structure and elements of a sample Set value action, to understand how you can integrate it into your custom application.

The following JSON code is a sample API response for the Set value action with a hard-coded value:

{

"actionSets": [
    {
        "actions": [
            {
                "actionProcess": {
                    "setValuePairs": [
                        {
                            "name": "ResponseSetValue",
                            "value": "\"abcd\""
                        }
                    ]
                },
                "action": "setValue"
            }
        ],
        "events": [
            {
                "event": "click"
            }
        ]
    }
]

}

A Set Value action with a hard-coded value
A Set Value action with a hard-coded value
You can configure multiple Property-Value pairs. All such pairs are listed in the setValuePairs array.

The following JSON code is a sample API response for the Set value action with a property reference:

"actionSets": [
    {
        "actions": [
            {
                "actionProcess": {
                    "setValuePairs": [
                        {
                            "valueReference": {
                                "reference": "InputSetValue",
                                "lastSavedValue": "a quick brown fox"
                            },
                            "name": "ResponseSetValue"
                        }
                    ]
                },
                "action": "setValue"
            }
        ],
        "events": [
            {
                "event": "click"
            }
        ]
    }
]

A Set value action with a property reference
A Set value action with a property reference
  • You can configure multiple Property-Value pairs. All such pairs are listed in the setValuePairs array.
  • The lastSavedValue element is the value that the referenced property (reference) contains.
  • DX API v1 does not support the when conditions in the action set.
Suggest Edit
Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.