NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Post expression use of condition statements

Hi all

the  expression   Field for  a step  does not allow use of   If else   statements

 

should I take it  as "limited" feature of teststand  & use the Statement-step or am I misled!

0 Kudos
Message 1 of 5
(3,419 Views)

I think  If else cant be used in "expression"  

 

may be I have to use the flow control

0 Kudos
Message 2 of 5
(3,418 Views)

What exactly are you trying to do?  If you are trying to set a value, then it can be done.

 

locals.num = locals.bool? TrueValue:FalseValue


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 3 of 5
(3,414 Views)

I wanted to use  the If else  condition statements

 

but  now I am able to do the same with "?:"

0 Kudos
Message 4 of 5
(3,412 Views)

It's true that expression allow only "a boolean select".

What is the use case for more complicated selections with more than two options?

Why is it beneficial to implement this as a step component (that means: obfuscating options) instead of displaying the selection in an obvious, readable way as multiple steps?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 5
(3,408 Views)