cancel
Showing results for 
Search instead for 
Did you mean: 

Copy Column From one collection to Another

vinodchinthakin
Level 9
Hi All

I have a Collection1 with Columns A,B,C,D and Collection2 with Columns E,F,G.
I want to copy Column B from Collection1 to Collection2. So that Output Collection Should contains Columns E,F,G,B

Do we have any solution for this.?

Thanks

------------------------------
vinod chinthakindi
------------------------------
4 REPLIES 4

Hi,

Follow the below steps for the solution:

1) Have two collections in place, in my case "Input Collection 1" has the fields A,B,C,D and "Input Collection 3" has the fields E,F,G both with some data present as shown below:

24365.png24366.png

2) Create two collections with single row which won't have any value as we are going to use them for 'Split Collection' action in Collection Manipulation VBO such that once collection has the field A,C,D and another has field B so that we can split our input collection having four fields A,B,C and D into two separate collections one having just the field B and another having A,B and C. In my case I have two collections named, 'Collection Template 1' and Collection Template 2' as shown below:

24367.png

3) Store the output of the previous action into two undefined collections whose fields need not be created. In my case, these collections are 'Splitted Collection 1' and 'Splitted Collection 2' as shown below:

24368.png

4) The inputs of the Split Collection should have the collection having all four fields, A,B,C and D along with the two single row collections which we are using as templates and the output should be assigned to the above two empty collections that we created. Refer to the below inputs and outputs for the 'Split Collection' action

24369.png24370.png

5) Now our 'Splitted Collection 2' holds only the field B with all the values and we have the second input collection in Step 1 which had the field E,F and G. We can simply use the 'Merge Collection' action in order to merge the 'Splitted Collection 2' with the Input Collection 3' and assign the output to an undefined collection with no field called as 'Final Collection' as shown below:
24371.png

24372.png
24373.png

6) The overall solution flow looks like this along with inputs and outputs

24374.png

24375.png


------------------------------
Regards,
Devneet Mohanty
Intelligent Automation Consultant
Blueprism 6x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com
------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please provide a big thumbs up so that the others members in the community having similar problem statement can track the answer easily in future.

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Technical Business Analyst,
WonderBotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------

Thanks Devneet Mohanty. Will apply your solution.

------------------------------
vinod chinthakindi
------------------------------

Perfect!. But in my case, Collection contains about 40-50 Columns. So I Created Template 1 collection similar to Template 2 collection. And I merged Splitted 2 collection with Collection 3 to get Required Collection And ignored Splitted Collecion 1. And it worked.

------------------------------
vinod chinthakindi
------------------------------

Glad my answer could help you out. Please mark it as the best answer if your query is resolved so that others having the same problem can track the answer easily

------------------------------
----------------------------------
Hope it helps you and if it resolves you query please mark it as the best answer so that others having the same problem can track the answer easily

Regards,
Devneet Mohanty
Intelligent Automation Consultant
Blueprism 6x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please provide a big thumbs up so that the others members in the community having similar problem statement can track the answer easily in future.

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Technical Business Analyst,
WonderBotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------