Stored Variable return Null instead of text

I’m missing something very basic about how text input and stored variables interact. I simply want to put a user’s name into a stored variable so I can use it on various screens. However, I don’t seem to be able to change the value of the stored variable and it always returns null.

You need to use the block that says “set stored variable P1name”. The problem with your blocks is that you’re using a block that takes a text string as input for the variable name but you’ve filled it with a stored variable instead of a text string.

Also, for any stored variables, you need to check for a null value when the screen opens and if it’s null, set it to an initial value such as an empty string (“”).

Thanks so much! I would have never seen the difference on my own, and I’ve had a difficult time finding a resource that clearly described that difference.

Thanks again from a thunkable nubie.

1 Like

@conroy33 What would be the best way for users to suggest additions to the documentation pages? There are lots of little nuggets of wisdom like this that are hidden in forum topics but could be added to the documentation. For example:

And the way to use text strings in cloud variables to reference Firebase key:value pairs.

@tatiang Good question and great call out! We don’t have anything external yet for this. We should!

I will make a note of this for now to update but the long term solution for this will be to create something where users can submit edits or things to add in our docs, even if just through a form.

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