Writing Undefined Collection to excel based on column header

Cher

New Member
I have 4 columns in a spreadsheet that I need to paste on another workbook. The size and order of these 4 columns on the source sheet vary. The Column names are consistent. I need to paste the columns on the destination workbook in a certain order going by their column name. The solution that I am coming up with is saving each column in a separate collection and then checking the field name, and adding a decision stage to check which column name it matches to, so I can tell BP to write that column at a certain position in the destination book. But I am needing to use 16 decision stages, 4 per column. Is there a better solution?

Sample:

Source (order of columns can vary):

Name | Phone | City | State

On destination, they need to be in this specific order:

Name | City | State | Phone

Thanks,
 

RsBhargav

Member
Hi Cher,

Try using "split collection" in collection manipulation VBO where there are three inputs in which one is your source collection. the other two are template which you need to define in which headers you want. try this and let me know

Thanks,
Rs
 

milind100

New Member
Dear @RsBhargav,

As suggested, tried the Action - Split Collection and it worked swiftly. Really appreciated your response, keep posting innovative solution.

Dear @Cher,

Please see attached screenshots, I have tried using same example as per your post. Hope this helps :)

Thanks
Milind Patil
 

Attachments

  • Source Collection.jpg
    47.7 KB · Views: 26
  • Action - Split Collection.jpg
    98.1 KB · Views: 25
  • Destination Collection - Before running process.jpg
    88.6 KB · Views: 22
  • Collection 3 - Before running process.jpg
    85.6 KB · Views: 23
  • Destination Collection - After running process.jpg
    45.7 KB · Views: 24
Top