cancel
Showing results for 
Search instead for 
Did you mean: 

Writing Collection value in Single Data Item

RoshiniSyed
Level 4
Hello,

I need to write the collection values in one data Item. I can write 1st record however after I write the second record in it, it overwrites the 1st one.

This is my collection which had 2 columns and rows are dynamic.
26723.png
I need these data(dynamic) in single data item.

Is there any way to achieve this?

------------------------------
Roshini Syed
------------------------------
3 REPLIES 3

John__Carter
Staff
Staff
Something like this maybe?
[Single Data Item] & NewLine() & [Coll1.Process] & ", " & [Coll1.Error]

Or maybe just convert the whole collection to a single JSON string using the JSON utility VBO.

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

Hi Roshini,

You can do it this way, lets say the data item where you need to write the data is called as 'Results'  and the collection name from where the data needs to be written is called 'Coll' so you can use a decision stage first and check if 'Results' data item is blank or not by using the conditional expression as: [Results] = ""

Now, the condition is true you can use a calculation stage and set the value of 'Results' data item as [Coll.Process] & " , " & [Coll.Status]

If the the condition is false you can use a calculation stage and set the value of 'Results' data item as [Results] & NewLine() & [Coll.Process] & " , " & [Coll.Status]

This logic will write the data in your 'Results' data item as follows:

Interactive Microsevice Co.. , Degraded
VizQl Server , Error​


NOTE: All this logic must be included within a Loop stage over the 'Coll' collection.



------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

It worked. Thank you for your detailed explanation.

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