Page instructions for page groups
Version:
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.
“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”
Published September 11, 2020 - Updated January 21, 2021