cancel
Showing results for 
Search instead for 
Did you mean: 

How to add values to collection in Object studio

RoshiniSyed
Level 4
Hello,

I have multiple read stages in my Object studio and I would like to add the data returned from  each read stage into  a collection (consecutive rows).

Anyone throws some light on how that can be done?

------------------------------
Roshini Syed
------------------------------
5 REPLIES 5

PabloSarabia
Level 11
Hi @Roshini Syed

If you want to add one line in a collection for each value readed with your read stage, you should make something like this:

25996.png

You can simplify the read part by adding elements to read in the same Read Stage. When you have all the data, use the Action "Add Row" from the internal VBO Collections to add new lines to your collection. Then use a Calculation Stage to insert the value.

You will get this as result:

25997.png
Is this what are you looking for?

Is a little bit weird this way... If you bring us more info we can give you a better solution I think. (Like... adding a loop to write in the collection easily or similar)


See you in the Community, bye 🙂


------------------------------
Pablo Sarabia
Solution Manager & Architect
Altamira Assets Management
Madrid
------------------------------

Thank a lot for your Prompt response Pablo Sarabia,.will try this out.

------------------------------
Roshini Syed
------------------------------

Hi Sarabia,
Thia is exactly what I am looking for ,but if there is any way to write the data in collection with the loop?

------------------------------
Roshini Syed
------------------------------

You can write directly into the collection if you want. First you make sure the collection has an empty row, then you use the 'Collection.Field' notation as Store In destination.
26002.png

------------------------------
John Carter
Professional Services
Blue Prism
------------------------------

Hi,

@John Carter yeah! Your version looks more clean. I totally miss that you can write directly with the Read Stage instead of ​storing it in a Data Item.

@Roshini Syed I think is hard to implement a loop here. As you see, exists different fields in the screen that you want to read. The only way I can think of is trying to search a method to implement a Dynamic Attribute in the Application modeller, for example, the field's path. Then, have all the paths in a collection, and looping through this collection changing the Dynamic Attribute and Reading and Writing the values.

But this way looks long and hard to maintenance if something change, I don't know 😞


Hope this helps you!!

See you in the Community, bye :)​

------------------------------
Pablo Sarabia
Solution Manager & Architect
Altamira Assets Management
Madrid
------------------------------