i want to write failed in Remarks column only for column that matches “Not At Fault & Payment Garage”.
And leave the other Remark column blank.
So does anyone have the solution for this.
io_dt.AsEnumerable.ToList.ForEach(Sub(row)
row(“Remarks”) = If((row("Nature Of Desc").ToString.Equals("Not At Fault") And row("OD/TP").ToString.Equals("Payment Garage")),"Failed","")
End Sub)
dt.AsEnumerable.ToList.ForEach(Sub(row)
row(“Remarks”) = (if(row("Nature of Desc").ToString.Equals("Not At Fault") And row("OD/TP").ToString.Conatins("Payment Garage”)),"Failed","")
End Sub)
dt.AsEnumerable.ToList.ForEach(Sub(row)
row("Remarks") = If(row("Nature of Desc").ToString.Equals("Not At Fault") And row("OD/TP").ToString.Equals("Payment Garage"),"Failed","")
End Sub)
You need to declare the Data Table in the Argument
(From d In DT.AsEnumerable
Let gp=If(d(0).ToString.equals("Not At Fault") And d(1).ToString.equals("Payment Garage") ,"Failed",String.empty)
Select DT1.Rows.Add(New Object(){d(0),d(1),gp})).copyToDataTable
Hi @Gokul_Murali ,
Try this in invoke code and make the direction of data table as in/out:
dt.AsEnumerable.ToList.ForEach(Sub(row)
row(“Remarks”) = If(row(“NATURE OF LOSS DESC”).ToString.Equals(“Not At Fault”) And row(" OD / TP ").ToString.Equals(“PAYMENT –GARAGE OD ( NON-AGENCY )”),“Check the input”,row(“Remarks”).tostring)
End Sub)