Collection inside a collection
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-09-17 06:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
25-11-21 07:40 PM
------------------------------
RAJENJA FUJIYAMA
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
26-11-21 05:58 AM
You can store the sub-collection data into another Collection stage by using 'Append Rows To Collection' action, In order to access the sub collection, you can use the following expression: [Parent Collection.Sub-Collection]
Also, please note that if you try to directly access any sub collection field from the looping pointer being set at the parent collection stage like, [Parent Collection.Sub Collection.Field1], then in that case by default the value of the first row of Sub collection for Field1 column will be fetched. If you want to access any other row data for that sub collection then you either need to again iterate through that sub collection or you can use the action 'Get Collection Field' which will accept a row index and the field name. You can pass any index from 0 to N-1 if N rows are available and it should be able to give you the values.
------------------------------
Regards,
Devneet Mohanty
Intelligent Automation Consultant
Blueprism 6x 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-03-23 07:50 AM
Hi Dennis, I am facing a similar situation , if you could please elaborate more on how it worked for you ? The steps that you followed please .
Thanks in Advance !
------------------------------
SHaikh
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-03-23 12:48 PM
Hi Shaikh,
You can try to follow the below steps:
Suppose you have the collections as below:
The Collection which has another collection in it say OuterColl and the collection inside is known as InnerColl:
Defination:
Current Values:
Create an empty collection say UnallocatedColl
and then use the below Calculation Stage:
Once you run this the InnerColl details will be copied to UnallocatedColl:
Now you can work as needed.
------------------------------
Manish Rawat
Project Manager
Mercer
New Delhi
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-03-23 02:07 PM
Thank you for your solution Manish!
But the problem that I am facing is , the inner collection has a single row and every field in the inner collection is a collection. These fields change everytime and are large in number .
I used the Action: Get Collection Fields to get the inner collection fields in a different collection .
But I am not getting how to loop on the field names collection and inner collection , to get every collection in the inner collection separately in a temp collection .
Thanks,
Nusrat
------------------------------
SHaikh
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
22-03-23 09:14 AM
Hi Shaikh,
You can achieve that by creating a custom action in the collection manipulation utility with below parameters:
Input:
Collection
Columnname
RowNumber:
Output:
found
ValueText
ValueCollection
Error
Code Stage snippet below:
valueColl = New DataTable()
valueText = ""
errorMessage = ""
found = False
Try
If coll.Columns.Count = 0 Then
'No columns present in Collection
errorMessage = "The collection does not contain any columns."
ElseIf String.IsNullOrEmpty(colname) Then
'Empty column is provided
errorMessage = "Provided column name is empty."
ElseIf Not coll.Columns.Contains(colname) Then
'Column not present in the provided collection
errorMessage = "The collection does not contain a field with the name "&colname
ElseIf coll.Rows.Count < rownumber Or rownumber<=0 Then
'Provided row is not presnet in the collection
errorMessage = "The collection does not contain row number "&rownumber
Else
' Initialise output params
Dim DataType As String = GetBluePrismDataType(coll.Columns(colname).DataType)
If DataType.ToLower().Trim() = "collection" Then
valueColl = CType(coll.Rows(rownumber-1).Item(colname), DataTable)
found = True
Else
valueText = coll.Rows(rownumber-1).Item(colname).ToString()
found = True
End If
End If
Catch ex As Exception
' Catch any exceptions thrown and set found to false
found = False
errorMessage = ex.Message
End Try
The below code will give output in ValueColl if the provided columname is Collection and if the same is other than this it will provide you the text value
CAUTION: If the field is of type password then you will get the text value of the password itself
Hope that was helpful.
------------------------------
Manish Rawat
Project Manager
Mercer
New Delhi
------------------------------

- « Previous
-
- 1
- 2
- Next »