Filter Datatable not working

Hi All,I am using filter datatable activity to remove the rows as below all rows are removing except the row value with “-2146826246”. Please help.

Hi,

#N/A is special value in Excel and it may be necessary to handle specially.
So, can you share input sample and expected output as xlsx file? It’s no problem if dummy data. We may be able to share workflow.

Regards,

Solution 1

Use “Contains” instead of “=”

Large numbers stored as numeric types may become scientific notation:

Example:

-2146826246 becomes -2.146826246E+09

So use Contains with distinctive digits:

Filter:

FR_ID Contains "2146826246"

Solution 2

Convert FR_ID column to String in UiPath

Drag a “For Each Row in DataTable” activity

  • Input DataTable: dt

Inside the loop, add an “Assign” activity

  • To:
row("FR_ID")
  • Value:
row("FR_ID").ToString

Hi @ManjuNarasappa

Use contains operator : FR_ID Contains “2146826246”

This will match both: “-2146826246” And “-2.146826246E+09”

If helpful, mark as solution. Happy automation with UiPath

Still not working for 2146826246 data is not removing with this row item. can anyone help me with the linq query for removing the above filter data from datatable and write remaing data in new datattable

Hi @ManjuNarasappa

This is working. Use this linq . Also attached the .xaml for your reference

dt.AsEnumerable().Where(Function(r) Not (String.IsNullOrWhiteSpace(r(“FR_ID”).ToString.Trim) Or (Double.TryParse(r(“FR_ID”).ToString.Trim, Nothing) AndAlso Double.Parse(r(“FR_ID”).ToString.Trim).ToString(“0”).Contains(“2146826246”)) Or r(“FR_ID”).ToString.Trim.Contains(“#N/A”) Or r(“FR_ID”).ToString.Trim = “0”)).CopyToDataTable()


Sequence2.xaml (8.4 KB)
sample_frid.xlsx (4.8 KB)

If this helped you fix the problem, please mark as solution so it can help others too

Thank you… First i need to check if Manual column is empty and FR_ID columns filters please share query for both columns