How Do You Refer the Collection Fields in Blue Prism

Data Items and Collections

At some point in a process you will need to store information. This could be a value that you read off a screen or the data in a CSV file. You can use either a Data Item or a Collection.

Data Items and Collections

Both can be placed on the Main Page or on a subpage.

1. Data Item

Use this if you only want to store a single value at a time. The properties of a Data Item are shown below.

Data Properties

Name – this is your choice, but it may not contain a full stop/period, quotation marks, or square brackets.
Data Type – choose the one that suits what you need to store in the Data Item.
The possible types are:

  • Date
  • DateTime
  • Flag – True or False
  • Number – this can be whole numbers or decimals
  • Password – same as text but will show the value as black dots
  • Text – this can store any combination of normal and special characters and numbers
  • Time
  • TimeSpan – a duration

Initial Value – If needed, you can provide a value that will be used when the process starts. It is not compulsory to provide a value.
Exposure – this setting will be discussed in a future article.
Current Value – this is the value stored in the Data Item while the process is running. This value can be changed at any point in the process using a calculation.
Visibility – by default a Data Item is only available to the page on which it was placed. If you need to use it on any other page you will need to switch this option off.
Initialisation – you only need to consider this option for a Data Item that is on a subpage. If this option is on the value in the Data Item will be restored back to the initial value every time the subpage runs.

When you want to refer to the value stored in a Data Item you use its name as shown in this calculation.

Calculation Properties 1

2. Collection

Use this of you want to store multiple columns or rows of data.
The properties of a Collection are shown below.

Collection Properties 1

Name – provide a name of your choice.
Fields tab - the fields are the columns you need for the data.
They can be added manually by first clicking on Add on the right. For each field you provide the following:

  • Name
  • Type
  • Description – this is optional

Initial Tab – if needed you can provide initial values for the collection. You will first need to click on Add on the right.

Collection Properties 2

If the data from the collection is going to be read from a CSV file for example, then you do not need to provide the fields nor initial values. This is known as an undefined collection. The fields will be determined from the column headers in the CSV file.

At the bottom of the screen you will see the same visibility and initialisation options as discussed for a Data Item. The Single Row option is used when a collection must only ever have one row of data.

When you want to refer to a particular field in a collection you must use the name of the collection as well as the field as shown in this calculation.

Calculation Properties 2

3. Collection Loop

There are 2 ways to work through the rows in a collection - a loop stage or a queue. Working with a queue is explained in other articles.

A loop consists of a Loop Start and Loop End. Between the two you need to place all the steps you want to perform for an individual row. Blue Prism will automatically repeat these steps for each of the rows.

Collection Loop

In the properties of the Loop Start you need to choose the name of the collection with which the loop must work.

Loop Properties

figueroagoold2000.blogspot.com

Source: https://blueprism.training/blog/basics/data-items-and-collections/

0 Response to "How Do You Refer the Collection Fields in Blue Prism"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel