04-17-2014 04:30 AM
Hi,
I would like to ask..how to terminate an execution from a pop up mesage button.
There is a select statement and on it there are 2 buttons.
press Ok to continue
press Terminate to terminate.
but i cannot use RunState.Execution.Terminate in the expression of Terminate button.
I tried to make the "Terminate Execution" on the Post Action but it did not work. It still proceed the steps on the MainSequence.
please help.
Thank you.
Solved! Go to Solution.
04-17-2014 06:03 AM
@toyan wrote:
[...]but i cannot use RunState.Execution.Terminate in the expression of Terminate button.
[...]
What does that sentence tell us?
You can enter a post-expression in your message popup step similar to this:
Step.Result.ButtonHit==2?RunState.Execution.Terminate():False
Norbert
04-17-2014 11:11 PM
Hi Norbert,
I tried that you suggested earlier but no luck.
so I use ActiveX to use the TerminateAll API and it works.
thank you 🙂
03-20-2019 08:45 AM
Just in case anyone else runs across this, you can use this post expression to get Button 2 to terminate the sequence:
Step.Result.ButtonHit==2?RunState.Execution.Terminate():0
It won't work if you have Step.Result.ButtonHit==2?RunState.Execution.Terminate():False as in Norbert's example above because Terminate() returns a numeric and False is a Boolean. You'll get a runtime type conflict error.