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
(165 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
Message 2 of 4
(153 Views)
Highlighted

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

 

Thanks

0 Kudos
Message 3 of 4
(78 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
0 Kudos
Message 4 of 4
(55 Views)