cancel
Showing results for 
Search instead for 
Did you mean: 

Working with Blueprim's collections

RubananthBalas1
Level 2

I have two collections, One collection contains information as follows.

Collection 1 includes following details, It has only one row.
|NAME|AGE|CITY|
|:----|:---:|:----|
|AA | 20|NEW |

Collection 2 includes following details, it has multiple rows but only two columns.
|NAME OF COLUMN|NEW COLUMN|
|:--------------|:----------| |
NAME |FIRST NAME|
|AGE |YEARS|
|CITY |PLACE|

I am running a loop with the collection 2. I need the Blueprism to select the value in first cell of the collection 1.

Normally if I want to select value in the first cell of the collection 1 I type following expression in Blueprim.

[Collection 1.NAME]

But this time I want the Collection 1 field 1 as the first value of the collection 2.

I tried following.

  1. [Collection 1.[Collection 2.NAME OF COLUMN]] 
    This produces a Syntax error. The token "]" is invalid.

  2. I set the value from Collection 2 to a new variable (data item) SAY "columnName"

    [Collection 1.[columnName]]
    This produces a Syntax error. The token "]" is invalid.

Since I am running this in a loop, every time the loop runs the field name automatically changes, that my goal

How to do this....?

4 REPLIES 4

ykoike
Level 6
Hi Rubananth,

I tried like your goal before. But, I could not make it.
I asked Blue Prism support how to make it, but they said impossible that automatically change field name in the Blue Prism collection.

I understood it is impossible because if collection field name (column name) change automatically, we have no way to get field data.
(Blue Prism must be specified column name to get field data.)

Ben.Lyons1
Staff
Staff
Hi Rubananth,

I think what this error is saying is that the second set of parenthesis are not required. You can simply use [Collection 1.Column Name] for collection 1 and if you are using a decision to compare the values [Collection 1.Column Name] = [Collection 2.Column Name].

If you are looking to write the value from collection 1 into collection 2, then use a calculation stage. The formula to be [Collection 1.Column Name] and then in the result box, use Collection 2.Column Name without paraenthesis.

Thanks

Ben
Ben Lyons
Principal Product Specialist - Decipher
SS&C Blue Prism
UK based

To get more clarity on what exactly you want to achieve can you answer few things?

Do you want to replace Coll1 Field Name from Coll2? Like Replace Name with First Name, Replace Age with Years, Replace City with Place?

So as output you want this type of collection? Is this right understanding?

Expected Output=
|FIRST NAME|YEARS|PLACE|
|:----|:---:|:----|
|AA | 20|NEW |

Is this what you want to achieve?

NicholasZejdlik
Level 9
The Read Collection Field action in the Utility - Collection Manipulation object should be able to accomplish what you are trying to do. It will allow you to specify a dynamic field name to read from.