Update specific column value with where condition uipath

Hi Techii,

I want to update reconcile Column, Where VNo =“HO-CN19316”

Please can you give me an update query in Linq , I am using for each but its very time consuming in my table i have 2 lakh record

@JSR_Techno_Talk_s
Hello
You can use this:
row.Item(“Reconcile Status”) = row.Item(“Reconcile Status”).ToString.Replace(“whatever”, “in_Status”)

regards

Hi @JSR_Techno_Talk_s , Hope below linq would be helpful

NewDt = Dt.clone (where Dt is source data table)

(From d In Dt.AsEnumerable
Let x = If (d(2).tostring.equals(“HO-CN19316”), “In_Status”,Nothing)
Let y = New Object(){d(0),d(1),d(2),d(3),d(4),d(5),d(5),x}
Select newDt.Rows.Add(y)).CopyToDataTable

Thanks,
Shaik Najeer.

Hi,

Can you try the following code in InvokeCode activity?

dt.AsEnumerable.Where(Function(r) r("VNO").ToString()=in_VONo).ToList().ForEach(Sub(r)
    r("Reconcile Status") = in_Status
End Sub
)

dt is In/Out DataTAble type argument in InvokeCode.

image

Regards
,

thanks
its working

1 Like

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