NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine if variable exist?

Solved!
Go to solution

I need to figure out how to determine if a variable exist.  Because if I don't, and evaluate a variable that didn't exist, I will get error.  Here's why I need to do this.  I need to print only failures in the sequence and the catch is that I can only print failures that causes sequence failures.

 

I have narrowed down that there's a bolean status in the result list TS.StepCausedSequenceFailure.  The issue is this variable only exist when the Step Caused Sequence Failure check box is checked, otherwise this variable isn't in the results.  Thanks for help.

0 Kudos
Message 1 of 2
(3,511 Views)
Solution
Accepted by topic author view_view

Use PropertyExists("Locals.ResultList[x].TS.StepCausedSequenceFailure"), where 'x' is index of the step you're interested in as a precondition to any step that will access this value.

 

Hope this helps.

 

-Jack

0 Kudos
Message 2 of 2
(3,504 Views)