Nested LINQ to get data from 1st datatable based on 2nd datatable filter in UiPath

Scenario — We have 2 datatables available, 1 datatable contains regional data and other contains a list of Valid Regions.

Everytime the bot runs it should only consider the valid regions to pull data from Regional Sheet.

Here is the sample data


Sample Data

LookUpData

Lookup Data

As you can see from the data, we only to retrieve data for ‘East’ and ‘West’ region from the first datatable. here is how you can do it

Write the Query in the Assign activity

Here is the complete video

Code Link - UiPathSamples/02 - NestedLinq at main · manojbatra071/UiPathSamples · GitHub

Youtube Video - Nested LINQ to get data from 1st datatable based on 2nd datatable filter in UiPath - YouTube

Happy Automation

Thanks
Manoj Batra