Solved Have a query in Blueprism coding stage and collection stage.

Status
Not open for further replies.

pavan

New Member
Hi,
i have some values got through for loop using code stage, like 1,2,3,4,5.
ex: for (i=1; i<=5;i++)
{
Console.WriteLine("{0}", i);
}
How would we get these values as out put into blueprism collection stage???
 
If output collection stage is collectionOutput then

Code:
Dim table As New DataTable
table.Columns.Add("Number", GetType(Integer))

For i As Integer = 1 to 5 Step 1
table.Rows.Add(i)
Next

collectionOutput = table

Hope this works fine. :)
 
In c#:

If output collection stage is collectionOutput then

Code:
DataTable table = new DataTable();
table.Columns.Add("Number", typeof(int));

for(int i=0; i<5; i++)
{
table.Rows.Add(i);
}

collectionOutput = table;

Note: Add System.dll in external references and System.Data in namespace imports if we are using collections with C#.
 
Last edited:
Status
Not open for further replies.
Top