Question
Accenture
IN
Last activity: 10 Sep 2018 2:20 EDT
how to refer a parameterized data page in a correspondence
Hi,
I am referring one Data page i.e. parameterized in a correspondence rule. Please let me know how should I pass the parameter .
https://community.pega.com/support/support-articles/not-able-reference-parameterized-data-page-correspondence :referred to this but my data page is list type and I need to show all the result. please let me know if any suggestions
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Accenture
IN
Hi Folks,
Found the solution. Thanks for your help.
<%
ClipboardPage Page= tools.findPage("pyWorkPage");
String strDefFlow = "";
strDefFlow = Page .getString("ID");
tools.getParameterPage().putString("ID", strDefFlow );
%>
No need to create a new section. We can include this code snippet in correspondence rule itself.
Thank you!
Pegasystems Inc.
US
Hi,
You can have a repeating grid in a section which can reference from a DP. Now you can include this section in the correspondence rule.
Please let me know if this helps you.
Regards,
Rachit
-
kuroki haruka
Accenture
IN
Hi Rachit,
Thank you!
I am using correspondence to send SMS. So including a section with repeating grid is not working.
Pegasystems Inc.
IN
Hi Sarita,
Can you send the screnshot of your design. It would be of great help for us to implement the same:)
Regards,
Ujjwal
Pegasystems Inc.
IN
Hi Sarita,
You can use a DataTransform prior to the calling correspondence rule and call Data Page with required parameter.
For example I would use D_Parameterized[MyID:"C-23"] and hence after this my Data Page would be loaded in clipboard and can be used as required.
Thanks,
Ujjwal
Accenture
IN
Hi Ujjwal,
Thank You!
Data Page is already on clipboard as it was called just before sending sms. However when I refer the same data page in the correspondence rule , it reloads the data page. As Parameter is not passed from correspondence it loads all results.
So I need to access the Data page that already exists / Need to load it again with the correct parameter.
Please let me know if any idea on this.
Pegasystems Inc.
IN
Hi Sarita,
If including the section is not an option then there is may be only one way left and that would be to copy DP to a page list and then the refer that.
Or instead of using Data Page use a list that references the datapage.
Thanks,
Ujjwal
Aaseya IT services Pvt. Ltd.
SA
Hi saritab2,
In correspondence rule add html code to iterate pagelist .Use this code
<div style="margin-left: 40px;"><pega:foreach name="Declare_LoadEmployees.pxResults">
Hi saritab2,
In correspondence rule add html code to iterate pagelist .Use this code
<div style="margin-left: 40px;"><pega:foreach name="Declare_LoadEmployees.pxResults">
<pega:include name="CustomSec" type="Rule-HTML-Section"></pega:include><span style="font-size:11px;"><span style="font-family: arial,helvetica,sans-serif;"></span></span> <br />
<span style="font-size:11px;"><span style="font-family: arial,helvetica,sans-serif;">• <pega:reference name="$THIS.pyEmployeeID"></pega:reference></span></span><br />
</pega:foreach></div>
Create custom section as mentioned in the link.Try like this
Accenture
IN
Hi Swathi,
Thank You!
It works that way . In this example they have hardcoded the parameter. I want to pass the parameter .
Suppose I have a value in pyWorkPage and I need to pass value of that property in place of hardcoded value.
Need syntax to get data from clipboard property and set it to the parameter page.
Code snipet that needs modification:
<%
ClipboardPage Page= tools.findPage("pyWorkPage");
String Str = (Here I need syntax to get the value of pyWorkPage.A)
tools.getParameterPage().putString("ID", Str);
%>
Accepted Solution
Accenture
IN
Hi Folks,
Found the solution. Thanks for your help.
<%
ClipboardPage Page= tools.findPage("pyWorkPage");
String strDefFlow = "";
strDefFlow = Page .getString("ID");
tools.getParameterPage().putString("ID", strDefFlow );
%>
No need to create a new section. We can include this code snippet in correspondence rule itself.
Thank you!
Cognizant
IN
Hi Sarita,
I have a similar situation, but in my case , the Data page on the clipboard has two parameters :Context : .pyWorkPage.pzInskey and retrieveTags : "true",please let me know what change required in the syntax.
Thanks
Accenture
IN
Hi Manjula,
<%
ClipboardPage myPage = tools.findPage("NameOfDesiredPageFromWhereYouNeedTheProperty");
String strFirstParam = ""; //String for storing values from desired page.So you can create as many variables as your no of parameters
strFirstParam = myPage .getString("pzInskey "); // getting first param
String secondParam =""; //String for 2nd param
secondParam = myPage.getString("retrieveTags");
tools.getParameterPage().putString("Param1", strFirstParam);
tools.getParameterPage().putString("Param2", secondParam ); //Param1 and Param2 ,replace with actual parameter names of data page
%>
And while use actual data page do not pass any param in [ ]. just give the name of data page.Property which you want to use.(D_DataPageName.FullName)
Try once.
Thank you!
Sarita
-
Jenni Murugesan Ravi Sagar Palivela