Question
5
Replies
509
Views
Posted: February 20, 2018
Last activity: February 20, 2018
Closed
Is there a way to merge 2 array?
I need a way to merge values of 2 array into 1 array. Can you help me?
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
I need a way to merge values of 2 array into 1 array. Can you help me?
I need to merge two value list. Exaple : String a[] = {"A"} i want to merge with String b[] = {"B"} and the result would be String b[] = {"A", "B"}. Can you do it in automation and not in script? Thanks.
Are you creating arraylist in the automation and then merge. If yes, you can check attached screenshot.
Follow this thread as well,
https://pdn.pega.com/community/product-support/question/concat-array
Hope either of the posts helps.
The best way would be in a script. If you wanted to do so in an automation, it could look like the screenshot attached (assuming both were single width string arrays). I am using the Join and split methods to put together and break apart the arrays using the value stored in the delimiter variable. In my example, I made it a comma, but if your list contained commas, then it would need to be something else (maybe a semicolon : or a tilde ~).
Pega Collaboration Center has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.
What is your requirement , do u have to merge two value list or page list ? For merging two arrays below is the code