Question
Salame
Last activity: 4 May 2017 11:40 EDT
How to convert comma-separated String to pagelist via an activity?
Hello Guys,
How to convert comma-separated String to pagelist via an activity (same as the following code in Java) ?
List<String> list = new ArrayList<String>(Arrays.asList(string.split(" , ")));
***Updated by moderator: Lochan to add Categories***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 5 Oct 2016 5:53 EDT
Infosys
GB
Hi Rosy,
Option 1:Use Apply Parse delimted activity method on a page reference (you can check any out of box parse delimeted references to find out how to configure) to parse the string data in to clipboard. This will map the data in to whatever the properties you mentioned in the delimeted rule.
Option 2: For example, if you have a string, seperated by comma, for each of the comma seperated value if you want to create the page list and you are not sure how many values may come, then simply use, whatcomesAfterFirst option in a loop and for each each value create a pagelist.
C3i
IN
Hi Rosy,
You can use Parse Delimiters for your purpose. Please find help from PDN for your reference
https://community.pega.com/sites/default/files/help_v72/procomhelpmain.htm
Please refer rule 'PegaSample-Task.pega.ParseWorkItem' for having a glance on how rule need to be configured
With Regrads,
Harsha A.
-
Nithin H N prasanth kota
Accepted Solution
Updated: 5 Oct 2016 5:53 EDT
Infosys
GB
Hi Rosy,
Option 1:Use Apply Parse delimted activity method on a page reference (you can check any out of box parse delimeted references to find out how to configure) to parse the string data in to clipboard. This will map the data in to whatever the properties you mentioned in the delimeted rule.
Option 2: For example, if you have a string, seperated by comma, for each of the comma seperated value if you want to create the page list and you are not sure how many values may come, then simply use, whatcomesAfterFirst option in a loop and for each each value create a pagelist.
-
Nithin H N Saravanan Selvamohan
Salame
Hello Hareesh, option 2 seems simpler, but, I didn't get it 100%.
inside for loop, what is the maximum that should be specified here, given that I don't know the max .
Plus, if I will use whatcomesAfterFirst , I will get the 1st value, how to loop for the rest?
thanks in advance,
Rosy
Salame
Plz disregard above, fixed::) thx a lot, Rosy
CVS
US
Hi Rosy-
2nd option suggested above looks simpler. But am not clear as well. How did you fixed? Can you pls elaborate?
-Thanks
PK
-
Lakshmi Srinivas Chitluri
TATA Consultancy Services Ltd
IN
Hi,
Could you please let me know the fix, I have the same requirement too.
Thanks in Advance.
Pegasystems Inc.
IN
Instead if manual java step, you could use direct function call to @(Pega-Gadgets:pxDataManipulate).pxPageListFromStringCSV which solves this requirement. Let us know if you need more information on this.
-
Aravind chindanoor swaroopa pujari SATISH DONDLA Matheswaran Ravichandran Krishnam Raju Kola
Incessant Technologies
US
You can use the method
@(Pega-Gadgets:pxDataManipulate).pxPageListFromStringCSV(Param.StringValue,ApprovalDocList, ".IDValue", "Data-Admin-Operator-ID")
which takes the parmeters String Value,Pagelist to appned,the Column and class
-
Radheesh S Hemanth Guptha Pasupula Subba
Infosys
IN
Hi Srilaxmi,
I am not able to give the parameters exactly for the given function.
I understood the String value and the class, what is the column >??
should the page list be the clipboard property or page list property created in the work class also???
Sanofi
ES
Hi Rosy,
I'm trying to achieve something very similar to your question, I've tried with option 2 in this comments but I'm stuck? Please could you share some hint?
Thanks.