I am getting the values one by one in while loop.in my case some of the values are not having values as it is empty hence it’s taking that empty value as tgt% row 11.
Because that value is in row 11 so it’s taking as row 11.
But there might be the case for other values also it might be empty which might take as row 12, or row of any number based on the that which row it is.
How to make it dynamic so that bot should fail of we get this tgt% row 11(number is dynamic).
From where are you extracting your data? You can add a conditional in your while loop, something like while ( AND NOT text.Equals(“tgt%”)), but I’m not sure about your particular scenario.
If possible, share some test data or your workflow.
Hey @Bhagyashree_S
you can use For Each Row activity or a While loop to process each item.
Inside your loop, before processing each item, add an If activity to check if the current item matches the unwanted pattern or is empty.
eg.
For Each Row in DataTable
If → String.IsNullOrEmpty(currentRow("YourColumnName").ToString) Or System.Text.RegularExpressions.Regex.IsMatch(currentRow("YourColumnName").ToString, "^tgt% row \d+$")
→ Then: Use a Continue activity
→ Else: Place your processing logic here