02-10-2023 09:01 AM
Hi,
I want to show a messagepopup via the SequenceFilePostStepFailure if a step fails.
But sometimes I have a step that sometimes fails. In this case I put the step on looping (e.g Stop after 1 iterations pass or after a maximum of 3 iterations).
How can i check in the SequenceFilePostStepFailure if I have a step that loops? ( In this case I don`t want to show the message, only after the 3th time when the complete step fails)
Solved! Go to Solution.
02-10-2023 04:44 PM
Can you query the loop index (I think it's "RunState.LoopIndex") from within SequenceFilePostStepFailure and only exercise it on the ones you want?
02-13-2023 12:28 AM
Hi,
In the SequenceFilePostStepFailure the runstate.loopindex is always 0
So I cannot use this
02-13-2023 04:23 AM
I think I found a solution 🙂
Parameters.Step.LoopType !="NoLooping" --> Check if the step that failed is a 'looping' step
Locals.LoopWhileExpression = Parameters.Step.LoopWhileExpression, --> Save the LoopWhileExpression in a local variable
SearchAndReplace(Locals.LoopWhileExpression,"RunState" , "RunState.Caller.RunState") --> Replace Runstate with Runstate.caller.Runstate
Evaluate(Locals.LoopWhileExpression) --> Check for the result of the loopwhileexpression.. If this is True it is not the last step in the loop