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?
This content is closed to future replies and is no longer being maintained or updated.
Links may no longer function. If you have a similar request, please write a new post.
I need a way to merge values of 2 array into 1 array. Can you help me?
What is your requirement , do u have to merge two value list or page list ? For merging two arrays below is the code
What is your requirement , do u have to merge two value list or page list ? For merging two arrays below is the code
String a[] = { "A", "E", "I" }; String b[] = { "O", "U" }; List list = new ArrayList(Arrays.asList(a)); list.addAll(Arrays.asList(b)); Object[] c = list.toArray();
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://collaborate.pega.com/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 ~).
Question Solved
Question
Question
Question
Question Solved
Question
Question
Question
Question
Question Solved
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.