Skip to main content
LinkedIn
Copied!

Table of Contents

Page-Merge-Into method

Version:

Only available versions of this content are shown in the dropdown

Use the Page-Merge-Into method to merge the contents of two or more pages into one page. Specify the source pages in the MergeFromList parameter.

Parameters

The Page-Merge-Into method accepts a list of source pages and one base parameter.

Parameter Description
MergeFromList List one or more page names to merge into the step page. Order is significant, because the pages are processed in the sequence that you specify here. Don't include the step page (the destination) as one of the source pages.

Identify one or more single pages for this parameter. You can reference a Page List property but you must include an explicit index value.

Keep Optional. The parameter controls the merge operation. Specify how properties and values are copied from the source pages into the destination page, by entering one of the following values:
  • 0 - The value of a property that is already present on the step page is retained, not overwritten by a value for that property on a source page.

  • 1 - The value of a property on a source page overwrites a value for that property that is already present on the step page.

  • 2 - The values of properties that are already present on the step page are retained (as with 0), but with special treatment for Page List, Value List and Value Group properties, as described below.

    Page List
    All source Page List elements are merged to the destination Page List with retaining the values of the destination page elements. This is the same behavior as for the Keep parameter set to 0. If the destination Page List property contains more elements than the source Page List property, the value of the first element of the source Page List is used for all the remaining target list elements. This behavior is different from that for the Keep parameter set to 0. With the Keep parameter set to 0, the values of the target list elements that are beyond the size of the source list are kept.
    Value List and Value Group
    If the destination page contains an empty property (with no elements), the source property is copied, including all its elements, into the destination. This behavior is different from that for the Keep parameter set to 0, as existing destination properties may be altered.
    Other modes
    Same behavior as for the Keep parameter set to 0.
  • 3 - The value of a property on a source page overwrites a value for that property that is already present on the step page (as with 1), but recursively for Page List, Page Group, Value List, Value Group.

Results

The system finds the destination page named in the Step page column in the activity step that calls this method. If not found, it creates a new page with this name.

If any of the pages that are specified in the MergeFromList parameter are not found, the merge process ignores them.

It copies properties and values from the source pages into the destination page, retaining or overwriting property values in the destination page according to the value of the Keep parameter.

It processes the source pages in the sequence that you entered them in the parameter array. As it copies a property and value, the system validates the value against the property definition (the Rule-Obj-Property rule) and marks any property that has an error. It updates the pxErrorList property with error messages.

Source pages are unaltered.

Checking the method status

This method updates the pxMethodStatus property. For more information, see How to test method results using a transition.

Restrictions

This method cannot be used in a step that involves iteration.

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.

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 Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us