Parameterized data page in pega

What is the parameterized data page in the pega?

As we know data pages provide data for a system to use on-demand. On the first reference of the data page, the system creates a data page instance and loads data in the clipboard.
Read more on data pages in pega

Passing parameters to the data page (Parameterized data page) to fetch quick and exact data that you need on the situation from the source.

How to pass parameters to a data page in pega

First, we need to define parameters in the "Parameter" tab of the data page rule form.
how to pass parameters to data page in pega

Syntax to use parameterized data page

<datapagename>[<comma separated list of parameter name:value pairs>]
We can pass single or multiple parameters with comma-separated.
D_ComplaintList[RequestType:Param.requestType,Department:Param.assginedDep]

parameter data page
Example to pass a single parameter:  
If it is a single parameter, no need to specify the parameter name, we can simply pass the parameter value.
D_ComplaintList[Param.requestType] - passing single parameter.
D_ComplaintList[.RequestType]  - if we are passing direct property (primary page) as parameter.
D_ComplaintList["ElectricService"] - passing direct value as parameter.


Where can we refer parameterized data page in pega

We can use data page with parameters to provide exact data in many of the rules in pega. Below are a few of them:
  1. Property
  2. Data transform 
  3. Activity 
  4. When etc.

Passing parameters to data pages using a property

We can refer data page and send parameters in the Property rule form if the property type is Single page or List page.
Passing parameters to data pages using a property
Scenario: When we create a new service request and wanted to check the latest issue reported in the same location based on the Zipcode. 
We will see how pega will create this page and passes parameters to the data page.
The clipboard page "PrevIssue" will be formed in two ways by passing parameters to the data page.

1. Refer to a data page - SoR (system of Record) pattern

We have created a page property and referenced the D_Previousissuesatthislocation data page and passed the parameter "Zipcode".
Used this Page property in data transform which will trigger on flow action submit (post-processing).
SoR data transform

Tracer:
sor pattern tracer
Clipboard structure - PrevIssue page. Pega provides matched instance reference to the PrevIssue page.
SoR clipboard
Clipboard structure  - data page D_Previousissuesatthislocation, data page have matched result.
data page clipboard structure SoR
We can notice data page structure in Clipboard, 
D_Previousissuesatthislocation_pa346379500512985pz (pzPageNameHash) don't refer this way instead we can refer  D_Previousissuesatthislocation[Zipcode:Param.Zipcode].

2. Copy data from a data page - Snapshot pattern

Take the same scenario but configuring page property with "Copy data from a data page" option selected in the property rule form.
property snap shot pattern

Tracer:
tracer snap shot

Clipboard: We can see in the clipboard the PrevIssue page is copied data from the data page for matched results.
Zipcode:12345 instance is copied to the previous page which there are User Pages.
clipboard snap shot pattern


We can use these two patterns SoR (Refer to data page) and Snapshot (Copy data from a data page) with keyed access data pages.

See more on the Keyed access data page in pega.




2 comments:

  1. what is the use of issueatthislocation property

    ReplyDelete
  2. You know my problem is actually using values from Data Page as configuration for other rules. For instance, I have Data Page over REST Connector. I want to pass Parameter from Data Page to Rest Connector. Within REST Connector I cannot seem to use value of Parameter directly anywhere, i.e. on the Methods tab. I tried to look up values with Parameter using another Data Page, also didn't work.
    Appreciate if you can do an article on this.

    ReplyDelete