09-19-2019 06:26 AM - edited 09-19-2019 06:27 AM
Hi folks
I am using a numeric limit test
The test is within a loop, and the current iteration is stored in a local variable
I am entering an expression in the Post-Expression field, and need to achieve the following:
If step fails, variable[iteration.local].local = Fail
So for example:
If step fails, variable1.local = Fail
This allows me to identify in which iteration the failure occurred, so I can record the result against the correct DUT in the batch that is looping.
Can someone tell me the required syntax to achieve the statement?
Thanks!
Solved! Go to Solution.
09-19-2019 07:28 AM
Is this array variable a Boolean? A String? If a Boolean, then you could simply use Locals.Variable[Locals.x] = Step.Result.PassFail in the Post Expression. If a string, you could use Locals.Variable[Locals.x] = Step.Result.Status in the Post Expression.
09-19-2019 08:17 AM
Ah great, yes a boolean is fine thanks for the syntax I will try that!
10-03-2019 10:56 AM
Hi, the following didn't work:
Locals.Variable[Locals.x] = Step.Result.Status
I got the following:
Unknown variable or property name 'Locals.Variable'.[Error Code: -17306, Unknown variable or property name. ]
Basically it did not insert the number from the variable in the square brackets and match the aimed variable.
How can I get that number in there? I have a loop that runs 6 times, and need it's iteration on the end of that local variable name, in order to store the result for each DUT in it's own variable.
Thanks!
10-03-2019 11:12 AM
Assuming you just configured the Numeric Limit Test to Loop:
Locals.Variable[RunState.LoopIndex] = Step.Result.Status
10-04-2019 03:08 AM
Hi
The numeric limit test itself does not loop, but it sits in a much larger loop where each DUT runs all it's tests, then loops 6 times for 6 DUTs. So I just need the current DUT number on the end of the local variable, allowing me to store each DUT result in a unique variable.
Thanks!
10-04-2019 06:19 AM
@Tom0000 wrote:
Unknown variable or property name 'Locals.Variable'.[Error Code: -17306, Unknown variable or property name. ]
That error points more to you didn't have that variable (Locals.Variable) declared or it is not defined as an array.
10-08-2019 03:52 AM
Great, thanks!