setValues: Public JS API for control actions
setValues
Set any target property from a source property or a literal constant. Supports setting of multiple target properties through a single call.
Syntax
var options = {
event: eventObject,
list: [{target: 'targetProp1', source: "SourceProp1/value", isProperty: true/false},
{target: 'targetProp2', source: "SourceProp2/value", isProperty: true/false},
…,
{target: 'targetPropN', source: "SourcePropN/value", isProperty: true/false}]};
pega.api.ui.actions.setValues(options);
Parameters
Accepts a JavaScript object which can have the following key-values:
- event: The event refers to a DOM eventObject.
- list: This is an array of JS objects with property references as key-value pairs. Confirm that the target property/source property references are enclosed in quotes.
isProperty
indicates that whether the source is a property or a literal constant. The default value ofisProperty
is false. For example:
[{target: "Page1.Prop1", source: "Page2.Prop1", isProperty:true}, { target: "Page1.Prop2", source: "1234", isProperty:false}]