From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

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
(5,225 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
(5,224 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


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 5
(5,220 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
(5,218 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
(5,214 Views)