[转]Have a query in Blue prism coding stage and collection stage.

本文转自:https://www.rpaforum.net/threads/have-a-query-in-blueprism-coding-stage-and-collection-stage.488/

 

 

问:

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#.

posted on 2019-04-27 08:31 freeliver54 阅读(...) 评论(...) 编辑 收藏

导航