Initialize a stored variable as a list

I’m having some trouble trying to use a list as a stored variable.
At very first open of the app (when I use a different PC) , I execute some check on the list but it seems not to execute them, like it doesn’t know it is a list.
If I add a “set stored variable” to empty list on screen start, then it works, like it use it as an initialization.

But how to know if the list need to be initialized or not?
Something like “is the variable existing?” Or “is the variable a list?”
Thank you

When you use stored variables, check for a null value when the screen opens:

When Screen Opens
…If stored variable = null
…then set stored variable to empty list

If that doesn’t solve your problem, please post a screenshot of the blocks you are using.

1 Like

How to search for a null value?Is it the block “is empty” from text group?

No. Use the equals (=) block and the null block to create the condition.

See this post: Null and nan on my counting app - #6 by muneer

I found it under the “Logic” category :wink:
It seems to work!
Thank you😉

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.