Showing results for 
Search instead for 
Did you mean: 

collection within collection - unique collection data?

Level 4

I have a collection that will have multiple rows in it.  I believe this is referred to as a nested collection in the documentation.  I also want this row to have a collection with unique data for that row.  This is what my collection (I call it Master List).  It looks like:


I have loaded data into a Blue Prism queue.  I am reading a row of data from the queue each time and populate program id, name, code, book.  I then use an Action and Add Row to the DEMOGRAPHICS collection (which has two text fields in it).  

As it loops through, it is successfully adding a row to the embedded demographics collection and storing values.

Eventually (after about 25 rows from the queue), I have logic that adds a new row to the Master List collection.  It is for a different object. 

What I thought would happen is that the Demographics collection for the new row would start at 1 row.  Instead, it looks like it is treating Demographics as a single collection instead of a collection within a collection?

This screen shot might make more sense:


If I go to the Master List collection and look at Current Values, row 2 shows all rows that are part of Demographics collection.  I need to have it separate so I can later use the data specific to that row.  I'm sure I'm overlooking something.

I could add more fields to the Demographics collection so I know which Program ID it corresponds to - but that seems redundant as I already have that information in the Master List for each row.  

(I think this would be link an array that had a link list as a field in another programming language.  The link list would be specific to the array element.)


Level 4

A little more clarity.  With a nested collection, can the nested collection have varying amount of rows?  It seems to not allow this.  Row 1 of the "master" collection might need 15 rows in the nested collection.  Row 2 of the master collection might need 20 rows.  I am struggling getting this to work.  

I would like to do this so I can add the whole data structure to a work queue.  In addition, when I have the robot interacting with the application, it will be on a screen in which it is inputting data into a table.  It would be best if all data was in the same location so I could just loop through the nested collection.