NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

use PropertyObject in pre-expression

I am trying to use a statement like "PropertyObject.Exists(Locals.Numeric)" in my Pre-Expression.  I am using TestStand 3.5.
 
Respectfully,
Robert
0 Kudos
Message 1 of 2
(2,824 Views)

Robert,

Check out the attached sequence.  The function is actually PropertyExists and you will want to make sure that you put the lookup string in quotes or it will look inside your variable for a lookup string (and will give an error if that variable is a numeric).  The preexpression is:

PropertyExists("Locals.Numeric") ? (Step.MessageExpr = "\"Locals.Numeric Exists\"") : (Step.MessageExpr = "\"Locals.Numeric Does Not Exist\"")

That should be all you need.  Let me know how it goes.

Adam

0 Kudos
Message 2 of 2
(2,816 Views)