Page instructions for page groups
You can use 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 page instructions are available:
UPDATE
REPLACE
DELETE
ADD
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 example is 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 example is 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 example is the post body when the DELETE
page
instruction is added:
“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
should 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”
Previous topic Page instructions for embedded pages Next topic Page instructions for page lists