Check value in DataTable?

I have DataTable DT.
I want to check every row in DT in column Channel if blank and Column AreaNameSales = RL , I want update column Channel to RL23.

image

Please guide me about it (LINQ).

@fairymemay you can go through the link it will help you to achieve

test12.xaml (8.5 KB)

use invoke code with this
dt.Select("[AreaNameSales] ='RL' AND [Channel] is null ").ToList().ForEach(Sub(row) row("Channel")="RL23")

invoke code arguments:

@jack.chan Error as below.

can you upload the xaml and excel file

@jack.chan File input as below.
InputFile - Copy.xlsx (7.0 MB)

File .xaml as below.
Sequence11.xaml (52.6 KB)

use this
Sequence11.xaml (52.5 KB)

Changes:

  1. invoke code argument direction should be in/out, not in
    image
  2. invoke code should be changed to this
    because some of the values in AreaNameSales are of type Double, need to convert to string
    dt.Select("Convert([AreaNameSales],System.String) ='RL' AND [Channel] is null ").ToList().ForEach(Sub(row) row("Channel")="RL23")
1 Like

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