Non-Invocable member 'Function' cannot be used like a method

Getting this error…


or is there any whay to read the only data which current_status is “Error” or “New”
image

Hi @NervousTuber

You can try with below condition

CurrentRow(“Current_status”).Tostring.Contains(“Error”) Or CurrentRow(“Current_status”).Tostring.Contains(“New”)

Regards
Gokul

1 Like

Hi,

As it seems you use C#, can you try the following expression?

DT.AsEnumerable().Any(x=>x["current_status"].ToString()=="New")

Or if you create your project as Vb mode, it will work.

Regards,

Okay got it, its working @Yoichi thanks…
@Gokul001 is there any another way to read the data without using foreach?

1 Like

Hi @NervousTuber

You try to use filter Data Table Activity

Regards
Gokul

last question, is there any linq expression for this same problem?


want to write the data into another excel

Hi,

Can you try to use the following expression in Assign Activity?

DT = DT.AsEnumerable().Where(x=>(x["current_status"].ToString()=="New" || x["current_status"].ToString()=="Error")).CopyToDataTable()

Regards,

Hi @NervousTuber

Try this expression

dt.AsEnumerable().Where(Function(r) r(“Current_status”).Equals(“New”) or r(“Current_status”).Equals(“Error”)).CopyToDataTable

Regards
Gokul

1 Like

nevermind, its working properly … Thanks @Gokul001 and @Yoichi for your help

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