NI TestStand

Showing results for 
Search instead for 
Did you mean: 

null refnum

Go to solution

Hello everyone,


I have a really easy question, I need an expression to detect a null refnum.


I am sending the StationGlobals.TS.CurrentUser.LoginName from TestStand to the User Interface via the FrontEndCallback.seq using the UIMessage. There are times when the StationGlobals.TS.CurrentUser does not exist (i.e. when the user click on the 'Cancel' button of the Login Dialog). I want to detect this situation by checking if the StationGlobals.TS.CurrentUser is a null refnum. I tried the following expression such as


StationGlobals.TS.CurrentUser == Null


StationGlobals.TS.CurrentUser == null


but they all do not work.


Can anyone please tell me the expression to detect a null refnum?


Thanks for reading


0 Kudos
Message 1 of 5

You might want to try Nothing instead of Null Smiley Happy

Thanks for supporting the GLA Summit 2021!

GLA Summit 2021
0 Kudos
Message 2 of 5

I have tried Nothing, but it still does not work. I am thinking of using the StationGlobals.TS.hasAttribute API.

0 Kudos
Message 3 of 5
Accepted by topic author hlim

Sorry, didn't read your post properly....


StationGlobals.TS.CurrentUser is of type container. For checking if it has been created, you can use the PropertyExists API function

Thanks for supporting the GLA Summit 2021!

GLA Summit 2021
Message 4 of 5

Hello Oli Wachno,


thanks for your big help. PropertyExists method works for me! I added the PropertyExists("StationGlobals.TS.CurrentUser") in the precondition of the step. This works very well.







0 Kudos
Message 5 of 5