cancel
Showing results for 
Search instead for 
Did you mean: 

Nested Collection in BP

ShivaniChandras
Level 3
Hi all,

When working with a multi-tiered nested collection, which was a converted JSON file, I was not able to fetch the details from inner most collection.

For example, Apple - Phone - IOS - User1 detail is the nested collection structure. If I try to access it as Apple.Phone.IOS.User1, I was not able to get the users' details.

Looping also didn't work as Apple.Phone.IOS this path didn't exist in the dropdown. Write as collection action of MS Excel VBO also didn't work due to hyperlinks. 

Copy rows did help, but I was able to get only the first user detail and not other users. It stated, index out of range error.

I also couldn't get any proper document on Nested collections. 

Any help or suggestion would be appreciated.

Thanks.

------------------------------
Shivani Chandrasekar
------------------------------
1 REPLY 1

Hi Shivani,

As soon as you converted the JSON Response into Collection, you first need to assign the nested collection to a separate collection data item. So let say in your example, you are getting the path Apple.Phone.IOS, so what you need to do is create an empty collection, let say we name it 'Nested Coll1'. Use a calculation stage and set the value of 'Nested Coll1' as [Apple.Phone.IOS]. Then you can iterate within the Nested Coll1 using the Loop Collection staga and in the drop down you will receive the name as well for Nested Coll1.

However, please be mindful that Apple should have Phone Collection which has only one row where IOS is another collection being nested. If there are multiple Phone rows and if you use [Apple.Phone.IOS] then in that case, it is always going to refer the first row of Apple collection where Phone collection has been nested ignoring all others.

As a basic principle always assign a nested collection to a separate Collection data item if it has multiple rows, the while iterating through it you can repeat this same logic for other nested collection items within it.

Let us know if it resolves your query!

------------------------------
----------------------------------
Hope it helps you and if it resolves you query please mark it as the best answer so that others having the same problem can track the answer easily

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant
Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please provide a big thumbs up 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 | Technical Business Analyst,
WonderBotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------