I have a datatable with 27 columns I want to check that in a column “Policy value” if value starts with “Windows” then replace old value with new value.
ex- Windows - abc - def
replaced value - WIndows – abc – def.
This For Each solution I have tried but is a bit slow.
Requirement is, in a Datatable which has 27 columns there is a column named Check Description I want to check if the item starts with Windows I want to replace “-” value with a EN - Dash value in that row and output the final datatable.
Let me know if you got the requirement or i Can elaborate more.
I think InvokeCode is one of the fastest ways in UiPath. It might be difficult to improve performance more.
dt.AsEnumerable.ToList.ForEach(Sub(row)
If row("Policy value").ToString.StartsWith("Windows") Then
row("Policy value")=row("Policy value").Replace("-","EN -")
End If
End Sub
)