Sometimes we might be asked to process only the top N records out of the total available records in the DataTable.
Let us see how to implement it!!!
Replace old_DataTable with your DataTable
N = 1,2,3….
Implementation using UiPath :
Let us implement a workflow which takes a sample DataTable and displays the top N records of it, according to our supplied input.
Drag “Build Data Table” activity into the designer panel and insert some sample data into it.
Drag “Assign” activity into the designer panel and populate it with the below code.
Drag “Output Data Table” activity into the designer panel to convert Datatable to String type.
Drag “Message Box” activity into the designer panel to display the modified data table.
Finally, let’s run the project.
Click here to download the Source Code…
Hope it has helped you…