Skip to main content


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

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

Page instructions for page groups

Updated on April 5, 2022

You can use the following page instructions to specify whether an embedded page in a page group within the post data is to be updated, replaced, added to, or removed from your case.

Page instructions for page groups include the groupIndex operation, which you use to specify the subscript of the page group that you want to modify. For example, your application contains myPageGroup(Phone) and myPageGroup(Email). When you specify “groupIndex” : Phone, you are indicating that you want to modify myPageGroup(Phone).

The following is an example of a case before a page instruction is added.

myPageGroup(Phone)
.Prop1 – “value1”
.Prop2 – “value2”
myPageGroup(Email)
.Prop1 – “value3”
.Prop2 – “value4”

UPDATE

You use UPDATE to modify the value of an existing property in a page group, for example, when a user edits a row.

The following is an example of the post body when the UPDATE page instruction is added.

“pageInstructions” : [{
         “instruction” : “UPDATE”,
         “target” : “myPageGroup”,
         “groupIndex” : Phone,
          content : {
             “Prop1” : “value5”,
        }
    }]

.Prop1 - "value1" in myPageGroup(Phone) is updated with "value5."

myPageGroup(Phone)
.Prop1 – “value5”
.Prop2 – “value2”
myPageGroup(Email)
.Prop1 – “value3”
.Prop2 – “value4”

REPLACE

You use REPLACE to overwrite an existing row in a page group.

The following is an example of the post body when the REPLACE page instruction is added.

“pageInstructions” : [{
         “instruction” : “REPLACE”,
         “target” : “myPageGroup”,
         “groupIndex” : Email,
          content : {
             “Prop1” : “value5”,
        }
    }]

.Prop1 – "value1" in myPageGroup(Email) is replaced with "value5.".Prop2 – “value4” is overwritten.

myPageGroup(Phone)
.Prop1 – “value1”
.Prop2 – “value2”
myPageGroup(Email)
.Prop1 – “value5”

DELETE

You use DELETE to delete a row in a page group.

The following is an example of the post body when the DELETE page instruction is added. The groupIndex value indicates that myPageGroup(Phone) is to be deleted. You do not need to send a content element when you use DELETE.

“pageInstructions” : [{
         “instruction” : “DELETE”,
         “target” : “myPageGroup”,
         “groupIndex” : Phone,
    }]

myPageGroup(Phone) is deleted.

myPageGroup(Email)
.Prop1 – “value3”
.Prop2 – “value4”

ADD

You use ADD to add a new row in a page group.

The following example indicates that a new page group with the subscript Family is to be added.

Note: If you try to add a page group that already exists, an error occurs.
“pageInstructions” : [{
         “instruction” : “ADD,
         “target” : “myPageGroup”,
         “groupIndex” : Family,
          content : {
             “Prop1” : “value5”,
             “Prop2” : “value6”
        }
    }]

myPageGroup(Family) is added.

myPageGroup(Phone)
.Prop1 – “value1”
.Prop2 – “value2”
myPageGroup(Email)
.Prop1 – “value3”
.Prop2 – “value4”
myPageGroup(Family)
.Prop1 – “value5”
.Prop2 – “value6”

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