Forum Discussion
6 Replies
- NisHeraValued Contributor
assuming that you are working with excel DDT drive you can not go back in the loop.
technically this is not TC limitation it is Ms-excel limitation.
But you can use different technique , store previous row in an array https://www.w3schools.com/asp/func_array.asp
0) define an array before you call DDT drive
1) in your loop just before Call Driver.Next() , store your XL values in array
2) In your xl values processing area put an IF condition like... if fails use array values.
- tristaanogreEsteemed Contributor
I concur that, if you need to re-use values of the current row for some reason, simply store those values in some structure (object, array, variables, external file, etc)... that is if you need to cycle back through. However, as long as you are still in the same iteration of the DDT loop, then you can just keep re-using the values until the loop recycles.
- GAutomationFrequent Contributor
row no status function Value 4 enable validate value in table abcd 5 enable click button If row table value validation fails then i want to write a function like the below one
If Validate value in table = err click ok on the message box click ok again on the screen then go to row 4 and validate the value again Is this possible in VB script? Ours is keyword driven
- tristaanogreEsteemed Contributor
The short answer is: yes. Basically, while you're within the same loop, there's no need to "go to row 4". You're already on row 4, you just exercise your logic as you have it written. Until you go back through the loop a second time, the values in the current row (row 4) are still available to you.