Hi
I am using invoke code to loop around a datatable and update a specific column value from “Subject to revie” to “Subject to review”
I get syntax error at line 2. What could be the issue? I’m using VB . I pass the dt_Req as In/Out argument and it is a Datatable
For Each row As DataRow In dt_Req.Rows
If row(“Status”).ToString().Trim().ToLower() = “subject to revie” Then
row(“Status”) = “Subject to Review”
End If
Next
You should make sure that you set the argument as DataTable in the invoke code activity. You should not get any errors. If you still get errors, you should try closing UiPath Studio and reopening it.
I passed in the similar way only. I tried closing and Opening. No luck. Can you Share screenshot of your code? Just wanted to see if you are getting any Error.
Capitalization and Punctuation: Ensure every statement ends with a proper punctuation mark, including the main statement block indicators.
Quotes and Case Sensitivity: Verify that the string comparisons are accurate in terms of quotes and casing.
Try this code:
For Each row As DataRow In dt_Req.Rows
If row("Status").ToString().Trim().ToLower() = "subject to revie" Then
row("Status") = "Subject to Review"
End If
Next