NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Conditions In "If" Flow Control Statement

Solved!
Go to solution

I want to execute a number of tests in my sequence "if" the value of one of one of my locals is not equal to any string from a list(array) of strings. I have tried this but it doesn't work. Can anyone help?

 

Locals.ECU_Config_ECU_Info.ECU != ("CGW","CGW(7DF)","SimCGW","EthCGW","DASy","SVC3","MCS2")

 

Thanks

0 Kudos
Message 1 of 4
(2,051 Views)
Solution
Accepted by crossrulz

Try the Contains() function.

Contains({"CGW","CGW(7DF)","SimCGW","EthCGW","DASy","SVC3","MCS2"},Locals.ECU_Config_ECU_Info.ECU)

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
Message 2 of 4
(2,039 Views)

This worked perfectly. I could not find mark as solution unfortunately, so I gave Kudos instead.

 

Thanks

0 Kudos
Message 3 of 4
(1,964 Views)

@jkerrigan12 wrote:

I could not find mark as solution unfortunately, so I gave Kudos instead.


That is because you are not the OP.  Do you use multiple accounts?


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 4 of 4
(1,941 Views)