Quantcast
Channel: NI TestStand topics
Viewing all articles
Browse latest Browse all 6525

Evaluate() with and without expression

$
0
0

Hello,

 

I want to insert into my teststand report the messages displayed to the operator (Message Popups). To do so, I use the "Step.MessageExp" value.

Sometimes this message has to be evaluated.

Example of message expression: "Please do: "+ (
(Locals.Case == "A")? "This":
(Locals.Case == "B")? "That":
(Locals.Case == "C")? "Wathever":
"Unexpected case")
And sometimes it is just a string (eg: "Please do that")

The problem I am facing is that if I use the following post-expression, it won't work when the message is just a string because nothing has to be evaluated:

Step.Result.ReportText="The following text was displayed:" + Evaluate(Step.MessageExpr)

 

How can I solve this? 

 

Thank you!


Viewing all articles
Browse latest Browse all 6525

Trending Articles