How to populate list of values of one property from a pxresults pagelist to a correspondence

Hi,

How to populate list of values of one property from a pxresults pagelist to a correspondence

I have a requirement to populate list of values of one property in correspondence, which is in pagelist(pxresults).

Could you suggest on How can we populate all the values in a list format for a particular property which in the pagelist inside correspondence.

@JANAKIRAMA

If I have understood correctly, you have a .pxResults pagelist and you want to take a specific property from that page list and present all the list property values in the correspondence?

There are a few options

  1. Add a section include to your correspondence template. The included section will define a table with your pagelist as the source. Just configure the table as needed by adding the property as a column (note that the full Pega CSS is not available to generated emails, so it will only be a basic HTML table, you have to add table CSS explicitly to your corr template). You can also use a repeating dynamic layout if needed.

  2. It’s possible to write JSP to define a custom HTML table with a pagelist as a source, using the pega:foreach syntax. Please see this OOTB Section for a basic example:

CL:
Rule-Application

ID:
DocumentWorkTypes

And also here for the JSP tag references: Pegasystems Documentation

  1. If you only want to display a single property, you could define a preprocessing data transform to loop through the pxResults list and concatenate the values into a single text property, and then include that property in the corr template. Eg. pxResults(1).Name = David, pxResults(2).Name = John. You could write a data transform to concatenate this into a single text property .NamesForEmail = David, John and then include .NamesForEmail in your Corr. You can use the OOTB function Utilities pyPropertyCSVFromPageList–(ClipboardProperty,String) for this.

@JoeH9464

Great Explanation. I tried using second approach Custom HTML table. It Worked. Thank you