cancel
Showing results for 
Search instead for 
Did you mean: 

concatenate collection Data item and data item

Sai_KrishnaSomi
Level 3
Hello community,

I have an excel header as Day 1,Day 2,Day 3,.........,Day 31 
i have read the excel and stored as collection "data"

in order to read the values of excel column, i'm using [data.Day 1] instead of this i'm trying to do it as dynamically

i=1,val=""
loop( i<32)
    val = [data.Day ]
    //some business logic
    i=i+1
end loop

In BP how do we concatenate the data items.


Thanks in Advance.

------------------------------
Sai Krishna Somisetty
------------------------------
1 BEST ANSWER

Helpful Answers

NicholasZejdlik
Level 9
Use the Read Collection Field action in the Utility - Collection Manipulation object. You'll need to keep track of the row index manually, but it will allow you to specify a dynamic value for the field name, which in your case would be "Day " & .

------------------------------
Nicholas Zejdlik
RPA Developer
------------------------------

View answer in original post

5 REPLIES 5

Hi Sai Krishna ,

How many rows of data do you have? One of the options could be to use the Transpose Collection action in Utility Collection and then use the BluePrism loop to extract or concatenate the data items using calculation stage.


------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------

good idea shashank but can we get the no.of columns and name of each column from excel i.e.,

Name      Student1         student2          student3...................
day 1       Present           Absent              Absent...................
day 2       absent             present             absent............
......
........

Students may change from class to class, how can we calculate number of present and absent days of each student?

hope you understand the problem.

------------------------------
Sai Krishna Somisetty
------------------------------

Hi Sai Krishna ,

1. Get collection fields action will give you the list of students. (You can delete the first row from this if required)
2. Use a loop  with list of students collection
3. Within the loop add a filter collection. Here the input parameter will be your main collection and a filter expression to filter out present/absent. The output will be a collection
4. Use row count on output collection of Step 3 to get the desired count

Note that Step 3,4 are within a loop. You can form a separate collection to save the results for all students


------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------

NicholasZejdlik
Level 9
Use the Read Collection Field action in the Utility - Collection Manipulation object. You'll need to keep track of the row index manually, but it will allow you to specify a dynamic value for the field name, which in your case would be "Day " & .

------------------------------
Nicholas Zejdlik
RPA Developer
------------------------------

Thanks nicholas it's worked

------------------------------
Sai Krishna Somisetty
------------------------------