04-03-2009 09:47 AM
I am calling a custom dialog action step which returns a numeric value based on which I want to goto one of several subsequent steps. I don't want a load of teststand flow steps for this simple requirement.
I tried setting a post action custom condition = True and messing with CustomTrueActionTargetByExpr = "stepname" but this causes an error.
Any ideas how to do this successfully? I am using version 4.1.1
04-03-2009 10:12 AM
You are close. I tried setting to CustomTrueActionTargetByExpr to "<Id of step>" and it worked. I think the documentation is incorrect in stating to use the name of the step. I'll file a bug report on that.
You could also directly set SequenceContext.NextStepIndex and SequenceContext.StepGroup.
04-06-2009 08:41 AM
You are close. I tried setting to CustomTrueActionTargetByExpr to "<Id of step>" and it worked. I think the documentation is incorrect in stating to use the name of the step. I'll file a bug report on that.
Actually it may be correct... I experimented a bit further and the following worked Ok after I put escaped double quotes round each step name:
Step.CustomTrueActionTargetByExpr = (Locals.ButtonPressed == 1 ? "\"fred\"" : ( Locals.ButtonPressed == 2 ? "\"barney\"" : "\"wilma\"" ) )