I'm new to BluePrism, and
I have a collection named ToDate, and it had 1 column named Column1
. I want to get the value of the second row, so I tried [ToDate.Column1.Row(2)]
, but it didn't work.
What can I do?
Join Stack Overflow to learn, share knowledge, and build your career.
I'm new to BluePrism, and
I have a collection named ToDate, and it had 1 column named Column1
. I want to get the value of the second row, so I tried [ToDate.Column1.Row(2)]
, but it didn't work.
What can I do?
It's a complicated thing to do in blueprism, actually.
You can try the following approaches:
Filter collection (using collection manipulation object), so that there's only one record, and then use [TemporaryCollection.Column1]
Use a page, that will loop through the collection and set the row that you'd like to have as a current row. Then you could use [ToDate.Column1].
Build a custom code. For example I have an action called vlookup, that mimicks the one from excel. Maybe that would be best here?
i believe you would want to build your own object to do this specific function, it woul dbe something like this where Coll is an input collection
If Not Coll.Columns.Contains(colname) Then
Throw New ApplicationException(String.Format( _
"The collection does not contain a field " & _
"with the name '{0}'", colname))
End If
groups = New DataTable()
groups.Columns.Add("Group", GetType(String))
For Each row as DataRow in coll.Rows
Dim store as String = CStr(row(colname))
If store <> NULL Then
For i as Integer = 1 to m.Groups.Count-1
If i = 2
groups.Rows.Add(New Object() {store.Value})
break
End If
Next
Return
End If
Next
if you have multi column collections you would need to nest this for i loop in for each column loop as well to grab other values. Code written from memory will likely not compile but mostly it should be there to fulfill your needs. this way you create an action with inputs and the output would be a collections specific row you are looking for.