[Solved] Stored Variable not appearing

So there is alot in the archives about Stored Variables, but I couldn’t find one to help me with this.

I have Initiated my variable on my start screen
Annotation 2020-03-25 165515

On my Text Add Screen I have set it as follows for my variable

And then on the screen I want the text from Stored Name to appear on, my blocks are

So far I am unable to leave from my Text Add Screen. (It gets stuck when I hit the save button). I was able to get success using Local storage, but I need to switch to Stored Variable to so the list can have more than 1 item. I’m sure its a block issue somewhere but I’ve tried to look at blocks from similar projects and am just having difficulty wrapping my head around this.

i dont know if you must missed showing the block but when you intend to populate a list, you should set it first to empty list.

set stored Name to emptyList

1 Like

Would that go on the screen the list will populate or the screen the text is added?

My problem still is that when I hit my save button after entering text, I get stuck.

It doesn’t show in my original picture but I do have a return to main screen block

@huntermclarkn you’d actually need to do something like this to initialise your list, and to make sure that you don’t wipe your list every time the app opens

Screenshot 2020-03-25 at 18.04.42

1 Like

Okay, I added that section. My problem now is that I enter the text on the add screen. But when I hit save I am not going back to the main screen to view.

can you share an entire screenshot of the blocks? or a share link? I’d be happy to look into this for you.

I think with your text entry blocks, they never equal null do they? just empty text?
Screen Shot 2020-03-25 at 2.39.00 PM

if you arent going to save, this means your code is not executing fully or your logic is not correct.

1 Like

Here is the full Screen Shot Of the add page ( where I can’t Save)

date input always has a starter value, it can’t be null. (i’m 75% certain)

try my blocks from above. the red ‘text’ blok. it’s worth a shot

I did change the blocks as shown below.

Now when I enter my app once it gets the the Main Screen the Screen goes white. Here are all my blocks on the main screen

@huntermclarkn you see to have a duplicate screen opens event handler.

If you place all your blocks into a single when Main_Screen Opens blocks then this should resolve this issue for you.

@huntermclarkn, you are asking to numerically arrange a list of names? Maybe try alphabetic order?

Also, follow @domhnallohanlon’s advce to combine those on open blocks into 1 full code block. Having more than 1 makes the app more prone to issues.

Okay, that solved the problem. But I still can’t get the data to show up. Here’s a link to the project https://x.thunkable.com/copy/4ca0fcfcc750171ee858552876e8c1a3

You have 2 issues that I see

see the app running here
https://thunk.app/w/Oqta0pjiK

first, you have your list population blocks within the logic for if the variable name is null. the issue with that is this means because you give it value at this point it will never be null. Also, then on the first time you assign it a value “empty list” you show exactly that. an empty list and the list is never populated aain because it’s never a null variable and the logic prohibits futher loading.

try this
giphy (17)

and then try to remove that extra ‘list’ block. the var name is already a list. you are trying to make a list, a list which may also be producing errors

1 Like

Thank you so much Jared, that’s the fix I needed.

2 Likes

Happy to help!

Be sure to return the love eventually! Teamwork makes the dream work!

Have been trying to put my little bit of knowledge out there whenever I can

2 Likes

Sorry. I fee it came off rudely. I didn’t mean you’re not helping others or providing info.

As a member of the community I really appreciated others can help me out! Thank you :pray:

1 Like

Not rude at all, I saw and read it as fostering community. Keep doing what youre doing! :slight_smile:

2 Likes

Hey, another question on the same vein with a link to the project
https://x.thunkable.com/copy/2d1ebc91d9700df665c7e374faa1e473

So I can now get my different Names to show up on the Main Screen, but when i click on individual names I want all their other Pet Info to be unique to that name I click on. Right now, When I click on a name from the list the next screen just shows the last other data that I have entered. Let me know if that makes sense and if you think a Stored Variable will work for that or if I need a cloud variable or something else entirely