Skip to main content

Set value UI action in DX API

Suggest edit Updated on June 8, 2021

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
Note: 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
Note:
  • 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.
Did you find this content helpful? YesNo

Have a question? Get answers now.

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

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us