As the process becomes a little complex, we might want to write our own code as per the requirement.
More customization is possible in Uipath by using VB.Net.
We have an activity to achieve the above, let’s see how to use it…!!!
Implementation using UiPath :
Let us implement a workflow which takes a sample data table as input and outputs the SUM of total sales.
Drag “Build Data Table” activity into the design panel and populate it with sample data.
Drag “Invoke Code” activity into the design panel.
In “Invoke Code” activity, click “Edit Arguments” option to pass the required parameters as below.
Sample_DT is our DataTable (IN Argument)
Sum is the summation result (OUT Argument)
In “Invoke Code” activity, click Code” option to write the execution code.
Below code is used to count the total sales of all the divisions
Dim row As DataRow
For Each row In Sample_Dt.Rows
sum= cInt(row(“Sales Amount”).toString)+Sum
Drag “Message Box” activity into the design panel and pass the “Sum” value into it.
Finally, let’s run the project.
Now, we can see total sales value being displayed.
Click here to download the Source Code…
Hope it has helped you…