setValues
Sets the value of a target property from a source property or a literal constant. Supports setting multiple target properties through a single call.
Signature
setValues(options)
Returns
Not applicable.
Parameters
Name | Description | Type | Required |
event | Specifies the event that sets the property value. | DOM event object | ✅ |
list | Specifies the target and the source for the value change. | JSON object | ✅ |
JSON objects
- activity
isProperty
indicates whether the source is a property or a literal constant. The default value ofisProperty
isfalse
, which means that the source is a constant. You can set up multiple target properties by setting an array.[ { "target":"Page1.Prop1", "source":"Page2.Prop1", "isProperty":true }, { "target":"Page1.Prop2", "source":"1234", "isProperty":false } ]
var options = {
event: eventObject,
list: [{target: 'targetProp1', source: "SourceProp1/value", isProperty: boolean},
{target: 'targetProp2', source: "SourceProp2/value", isProperty: boolean},
...,
{target: 'targetPropN', source: "SourcePropN/value", isProperty: boolean}]
};
pega.api.ui.actions.setValues(options);
Previous topic runActivity Next topic Previewing Cosmos React UI