Saturday, September 3, 2022

Convert comma-separated String CSV to Pagelist

 In our business logic often we have the requirement to convert the string CSV value to a page list.

E.g – Apple,Orange,Banana,Mango,Grapes

We need to convert this above string comma-separated value to page list

There are many ways to achieve this. but the easiest way to do this using an OOTB function 

@(Pega-Gadgets:pxDataManipulate).pxPageListFromStringCSV

This function takes 4 parameters.



stringCSV

inputPagelist

property

pageClass

Let's see how to use the same

@(Pega-Gadgets:pxDataManipulate).pxPageListFromStringCSV(Param.CsvValue,.pxResults,".pyName","PO-Demo-Work-APlusInsurance")

In the above example Param.CsvValue contains comma separated CSV values.

pxResults is the pagelist name  

pyName - Property name to hold the value

PO-Demo-Work-APlusInsurance - Pagelist Class





 


 

     





No comments:

Post a Comment

CSV format string from a Pagelist

In our business logic often we have the requirement to convert PageList to string CSV values. From -  PageList.pxResults(1).pyLabel  = P1 Pa...