12-20-2018 05:51 AM
TestStand 2014
I am using the Post-Expression to update an Array with a Conditional Operator and somehow the array is not updating , the array doesn't change .
Example :
RunState.Sequence.Main["Read Current"].Result.Status == "Failed" ? FileGlobals.uut_Settings.UUTShort[0] = False : True
Any recommendation ?
Thanks,
Solved! Go to Solution.
12-20-2018 06:04 AM
I think you may have your assignment, condition and first return value mixed up; try this:
FileGlobals.uut_Settings.UUTShort[0] = RunState.Sequence.Main["Read Current"].Result.Status == "Failed" ? False : True
I hope this helps,
Charlie
Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)
Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor
12-20-2018 06:57 AM
Thanks , I will try it .
In Teststand 2012 I did not have this issue , do you know why ? .
12-23-2018 07:37 AM
Hi Charlie
I try your suggested sequence and it still not working , it's always change the Array to "True" even if the sequence "Failed" .
The default array elements are False .
Any suggestion ?
Thanks
Benny
12-26-2018 02:50 AM
Hi
I Try it in "Post Actions" section using "Custom Condition" and it is working fine .
In "Post-Expression" section it is not working as expected .
Thanks
Benny