Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

setValues

Updated on December 13, 2022

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

NameDescriptionTypeRequired
eventSpecifies the event that sets the property value.DOM event object
listSpecifies the target and the source for the value change.JSON object

JSON objects

list
isProperty indicates whether the source is a property or a literal constant. The default value of isProperty is false, 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
   }
]
For example:
 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);

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

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