Hi all, apologies straight away for the horrible title as it’s not a great description.
My problem I need to resolve:
Currently I have a for loop, looping through a datatable. The issue with The loop is, I unfortunately have to break it in order to continue the rest of the work flow I need done however, when the loop breaks and continues the rest of my workflow, because I am using the reframe work it will loop back into the for loop and only pickup the first row. How do I make it so when it loops back into my for loop the for loop gets the next row?
Fine
–this is something tricky but, we wont be able to use WHILE loop as you want to break and get back again
–so we can simply use a SEQUENCE instead of a FOR EACH activity as that has no impact here and is anyhow the sequence is going to be repeated next, being in REFramework
–then inside the sequence start by using a IF condition like this counter < datatable.Rows.Count
counter is int32 variable with default value as 0 defined in the variable panel
so if the condition passes it will go to THEN part where we can have this sequence else goes to ELSE part where we can leave it empty
–and in THEN part use a assign activity to get the value of the row one by one like this str_output = datatable.Rows(counter)(“yourcolumnname”).ToString
where str_output is a string variable and
–followed by this assign activity use another assign to increment that counter counter = counter + 1
–thats all the sequence ends
so in the next iteration in REFramework the counter will be increment and we will getting the next row value for each iteration…
hope this would help you
kindly try this and let know for any queries or clarification
Cheers @rohangroombridge