04-09-17 06:42 PM
25-11-21 07:40 PM
26-11-21 05:58 AM
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 !
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.
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
------------------------------
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.