03-18-2021 11:37 AM
Hello,
is there function that i can use in a if/else statement to check if a variable exists?
Something like
if (exists(StationGlobal.MyVariable))
do seomething
else
now do this
end
Thanks
Solved! Go to Solution.
03-18-2021 12:11 PM
You can use the PropertyExists() function to check for the variable (it returns a boolean).
There are a lot of resources on the forums on how to write an if/else expression. Look for "Conditional" operator in the link to get started.
https://zone.ni.com/reference/en-XX/help/370052AA-01/tsfundamentals/infotopics/operators_expression/
03-18-2021 12:20 PM
StationGlobals.Exists("MyVariable",0)