How to column value based remove entire row?

how to column value based remove entire row. i have a datatabe ID Disabled column value is True remove that entire row how to work.

Last Logon Is Dialin Is Disabled
Dec 1, 2021 10:44 AM FALSE TRUE
Nov 30, 2023 10:59 AM False TRUE
Jan 11, 2024 12:13 PM False TRUE
Jan 18, 2024 12:43 PM False TRUE
Jun 15, 2023 05:24 PM False FALSE
Oct 16, 2023 04:46 PM False FALSE

@domsmgtmeet22,

Use below code in Assign activity.

dtOutput=dtInput.Select("[ID Disabled]<>'True'").CopyToDataTable

Thanks,
Ashok :slight_smile:

Hi @domsmgtmeet22

You can use the below LINQ Expression to remove the rows which contains True in Is Disabled column.

Check the below steps,
→ Use the Read range workbook activity to read the excel and store in a datatable called dt.
→ Then use the assign activity to write the below LINQ Expression,

- Assign -> dt = dt.asenumerable().where(Function(row) Not(row("Is Disabled").toString.tolower.equals("true"))).Copytodatatable()

→ Then use the write range workbook activity to write the dt in the excel.

Hope it helps!!

it is not working kindly share another code

@domsmgtmeet22,

What’s the error or result you are getting?

Thanks,
Ashok :slight_smile:

Have you tried the above solution… @domsmgtmeet22

how to use for each method

@domsmgtmeet22,

Sample code:
Workflow5.xaml (9.3 KB)

Thanks,
Ashok :slight_smile:

Check the below workflow for better understanding… @domsmgtmeet22
Sequence2.xaml (11.1 KB)

Check the Input and Output data,
image

image

Hope it helps!!