How to copy only one column from a collection using BP?

aleeassad

New Member
Hi- I am new to BP. I have copied a csv file into a collection for manipulation. I want to extract the data for only one column of this collection. The other challenge is that the column values do not start till row 73. I have to do this for multiple similar files where the number of entries in the same column varies. How can I copy this one column into another collection? I am new to BP and will appreciate your help. Thanks
 

Sachin_Kharmale

Active Member
Hi [B]aleeassad[/B],

You need to Design Flow Like Bellow ,
View attachment 1560161165938.png

1)Loop the Input Collection That you are getting after Reading csv file.

2) Take one Data Item named is as Row Count and initialize it to 1
View attachment 1560161521476.png
2)After loop Row count value will be increase by 1 [Row Count}+1
View attachment 1560161496745.png
3)Add as Decision Stage to Check Row Count equal and Greater than 73 (Because your data will be start after 73)
View attachment 1560161473805.png
4)if Row count Greater than 73 then add new to your another collection
View attachment 1560161445572.png
5)Copy Your input Collection column to Another collection .
View attachment 1560161425458.png

I hope it will help full to you.
Best,
Sachin
 

aleeassad

New Member
Thanks Sachin. I was able to implement your solution and it works fine. A quick question: What if the data in the column will start after a specific column value instead of starting at row 73 ( this column value can be in any row). How will that impact the logic? Is there any VBO available to search for a certain entry in a collection and return the cell number? Thank you for your help
 

aleeassad

New Member
So here is what I am struggling with. I do know the unique identifier in the column I am trying to copy. I also know the total number of rows. When I use the filter collection option, it only gives me the filtered values containing the unique identifier. The unique identifier value is supposed to be the starting point from where I want to start copying data items till the end of the rows in the particular column.

I have tried using a loop with a counter and decision stage. The decision stage evaluates if [Collection. Column1]="Unique Identifier". If it find the unique identifier, it will end the loop otherwise it will loop back again and increment the counter. However, when I use this approach, the counter keeps on incrementing endlessly.
 

Sachin_Kharmale

Active Member
Thanks Sachin. I was able to implement your solution and it works fine. A quick question: What if the data in the column will start after a specific column value instead of starting at row 73 ( this column value can be in any row). How will that impact the logic? Is there any VBO available to search for a certain entry in a collection and return the cell number? Thank you for your help
Yes we can implement just give Search value as a input parameter and it will return Index .
 
I just want to add a note to the column extraction -- there is an action in collection manipulation called extract columns into Collection which does it without looping.
 
Top