Filter Data Table Shows Blank Output

Hi All,

I am trying to filter my data table based on following conditions . However, the output shows blank even if there are matching values. Below are my conditions which I need to be filtered. If I want to implement Linq how the query should be?

mismatched_column=0.0
sfdc_RPA_Close_Eligible__c
ns_created_date= Last seven days date
sfdc_order_type= New Business, Renewal
ns_class_name= Azure, GCP


@Anil_G @Yoichi Can you help me with Linq query for the above conditions where I need to take last seven days date

@dutta.marina,

You should be choosing Or Operator for sfdc_order_type & ns_class_name as you ate comparing more than one.

Click on And to change it to Or for these two columns and you should get desired data.

Thanks,
Ashok :slight_smile:

Added to that keen observation of Ashok, also validate your datatypes in your datatable. If those true/false values are auto converted into actual booleans, making a filter with “true” (which is a string) will automatically filter out all rows.

@ashokkarale

Thank You. For mismatch I am not getting proper output. It should filter only 0.0

@dutta.marina,

Check what value it shown in formula bar in Excel and in your DataTable once read

image

Whatever is the values in DataTable you should be using it for Filtering.

Thanks,
Ashok :slight_smile:

@ashokkarale

I have taken below

@dutta.marina,

Tryin changing New Business & Azure as Or condition as well.

@ashokkarale

I should get only true and 0.0 but here its comes as true or false and 0.0, 1.0, etc


@dutta.marina,

Would you be able to share the sample excel file?

any checks has to be done at the datatable (after read-in e.g. with a read range) as values visualized in EXCEL are not mandatory within the same format / datatype in the DataTable.

Therefore we would use e.g. the immediate panel
Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum

Once the details are cleared you can start to develop the LINQ

@dutta.marina,

Filter DataTable is tricky one. Here is alternate solution with Select method in Assign activity.

dtInput.Select("[sfdc_RPA_Close_Eligible__c]='true' AND ([sfdc_order_type]='New Business' OR [sfdc_order_type]='Renewal') AND ([ns_class_name]='Azure' OR [ns_class_name]='GCP') AND [mismatched_column]='0.0'").CopyToDataTable

Solution:

Sample Code:
Main.xaml (10.6 KB)

Output file shared personally.

Thanks,
Ashok :slight_smile:

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