Links may not function; however, this content may be relevant to outdated versions of the product.
getDataPage: Public JS API for control actions
getDataPage
Get the data page data from the clipboard in JSON form
Syntax
var options = {
name: “dataPageName ",
parameters: [{name: "param1", value: "Page1.prop1", isProperty: true}, {name: "param2", value: 123, isProperty: false}],
callback: callbackFunc,
event: eventObject
};
function callbackFunc(resultJSON){
console.log(resultJSON)
}
The sample blow shows the JSON obtained from the data page.
{"pzPageNameBase":"Declare_LoadEmployees",
"pzPageNameHash":"_pa235705995598112pz",
"pzPageToDisplay":"Declare_LoadEmployees",
"pxDPParameters":{
"EmployeeName":"(null/empty)"
}
,"pxResults":[
{
"pxObjClass":"Data-UIGallery-RepeatingLayouts-EmployeeDetails"
,"pyDateOfBirth":"19790115"
,"pyEmployeeID":"100298"
,"pyEmployeeType":"Full Time"
,"pyExperience":"8.2"
,"pyGender":"Female"
,"pyName":"Abigail Lippman"
,"pyRole":"Site Services"
}
,{
"pxObjClass":"Data-UIGallery-RepeatingLayouts-EmployeeDetails"
,"pyDateOfBirth":"19860529"
,"pyEmployeeID":"103986"
,"pyEmployeeType":"Full Time"
,"pyExperience":"2.4"
,"pyGender":"Female"
,"pyName":"Amanda Jones"
,"pyRole":"Tech Services"
}]
}
pega.api.ui.actions.getDataPage(options);
Parameters
This API accepts a JavaScript object which can have the following key-values.
- name: The name of the data page.
- parameters: Optional. Array of the data page parameters in JSON format.
- callback: Callback function to be called with the resulting data from the data page.
- event: The event refers to a DOM eventObject.