SwathiM5232
(Swathi Muralidharan)
October 3, 2022, 8:35am
1
Hi All,
I have the below requirement
Pagelist.pxResults(1).pyText = [email protected] ;[email protected]
pagelist.pxResults(2).pyText = [email protected] ;[email protected] ;[email protected]
I want to retrieve only unique values from above results [email protected] ;[email protected] ;[email protected]
Tried @pyRemoveDuplicatesFromPagelist , it removes duplicates only if all the values in both the pages matches . So in my case its not working.
Please help me with the above requirement
Thanks
ArulDevan
(Aruldevan Thangappan T)
October 3, 2022, 8:46am
2
Hi @SwathiM5232 : There is no OOTB feature available to do this. You can still achieve this programmatically
Loop through your page list
Tokenize the string based on delimiter and append the results to a new page list
Remove duplicates from the new page list
Thanks
SwathiM5232
(Swathi Muralidharan)
October 3, 2022, 9:06am
3
@ArulDevan Hi Arul thanks for your reply.
I didnt understand step 2 .Could you pls share screenshot if any. It would be helpful
Many Thanks
ArulDevan
(Aruldevan Thangappan T)
October 3, 2022, 9:22am
4
Hi @SwathiM5232 : Sorry. I don’t have docs for this. Let me try to explain.
Within the loop you need to split pyText based on the delimiter (semi colon in this scenario) and can append it to a page list. To do this, you can either create a function (similar to pxParsepxResults) or can use Parse-delimited.
Once you have the page list, then you can remove duplicate from it.
Please let me know if this helps.
Thanks.
SwathiM5232
(Swathi Muralidharan)
October 3, 2022, 7:50pm
5
@ArulDevan Hi Arul.. Thanks for the clarification
As Suggested by you , I have created parse delimited rule similar to above and the results are getting stored into a value list (.IMOEmailList)
.IMoEmailList(1) , (2)…etc
Now how do we set this value list to a pagelist in activity.
Pls suggest.
Many Thanks
ArulDevan
(Aruldevan Thangappan T)
October 4, 2022, 1:58am
6
Hi @SwathiM5232 : You can loop through the value list in activity using for each element in value list.
Another suggestion: instead of doing the parse delimited for each loop, build a single sting with all pyText and use Parse-delimited once.
Thanks
SwathiM5232
(Swathi Muralidharan)
October 7, 2022, 6:48am
7
@ArulDevan Thanks Arul , 2nd option helped