NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Message popup response string

Solved!
Go to solution

I store the response string from message pop using

Locals.ResponseValue= AbsVal(Step.Result.Response))

ResponseValue should be numeric (between 0 to 999), how to test if response entered is string?

*************************************************
CLD
*************************************************
0 Kudos
Message 1 of 3
(3,693 Views)

Edit to original post:

 

Checking to see if VAL() returned 0. If zero then not a valid number. Only issue that it will ignore 0 also.

Not sure if there is a better way to do this?

 

TIA.

*************************************************
CLD
*************************************************
0 Kudos
Message 2 of 3
(3,690 Views)
Solution
Accepted by topic author lvrat

you could check if this condition is true:

 

Str(Val(x))==x

 

this will return true for valid numbers, false for anything else.

Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 3 of 3
(3,686 Views)