Extract Specific Data

How can we Extract Specific Row from Data Table?

For Example we are having 3 columns
ID | Name | Dept | Date
1 | Abc | IT |2022
2 | KKK | HR |2021

So from here depending on the Dept and date perform certain Operation
If Dept is “IT” and Date= “2022” in Data Table
Then …

Else if
Dept is HR and Date=2021


After Extraction how can we perform the Action depending on the Scenario Specified

Thanks and Regards

You can use the filter data table activity for each set of conditions, which will return your desired datatable rows

Hi @anmita

Further to @TimK’s post,

Use Filter DataTable,
Create a breakpoint using F9

Then run in debug mode (the normal option from studio - the blue play button)

Once you reach the breakpoint, you can use F11 to go step by step.

You can then monitor the Locals Panel to review the datatable

(you can copy out the datatable into a txt file and convert to csv to preview it).

Hopefully this helps.



If you’re extracting the rows and then processing them individually, you could use a switch statement to determine the route. Can get very ugly very quickly if you have a lot of potential routes.

A flowchart is potentially cleaner.

Would recommend using subflows instead of building large parts of code into the switch/flowchart.

You could also consider moving to a dispatcher/performer model so that your dispatcher handles the if then logic, creating queue items for specific robots to execute afterward.

Hi @anmita, I hope you are doing well.

For the use case which you have mentioned above i am attaching a file for your response. Just add the excel file path to get the output.
Please let me know whether this is the desired output you want or not.

Thanks and Regards,
Shubham Dutta
Main.xaml (14.5 KB)

Hi @anmita ,

If you want to get a particular Data Row based on certain condition then you can also try the below method

(from R1 in TestDT.AsEnumerable where ((R1.Item(“Dept”).ToString.Equals(“HR”)) And (R1.Item(“Date”).ToString.Equals(“2021”))) Select R1 )
This will return you datarow you can perform further actions using this datarow.


Thanks Everyone for your quick Response!!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.