Jannick Schultz

unread,
Jul 18, 2018, 5:19:46 AM7/18/18
to MIT App Inventor Forum
Hi all

Im quite new to AI2, so please bear with me...

I have this problem:
I want to get a DB value and store it in a variable, but Im getting this fault all the time "This block cannot be in a definition".

What do I do and how do I avoid my variable being reset, every time I load the screen?

BR
JS
Capture.JPG

Chris Ward

unread,
Jul 18, 2018, 6:46:35 AM7/18/18
to MIT App Inventor Forum
Hello Jannick

The reason you cannot do it is that the App has to be initialized in memory first. So, you do this (example for two variables):


Chris Ward

unread,
Jul 18, 2018, 6:54:48 AM7/18/18
to MIT App Inventor Forum
Reply all
Reply to author
Forward
0 new messages