How to get the stored Data value Thunkable Makeroid AppInventor

In the last post we learned that how to store app Data or users Data In the system of device.So now let's know how to get the value from the System of Device and give certain commands by basing that Data.
So let's get started Now.
This is the continuation of last post about How to store User Data. If you didn't read that post then we recommend to read that post first.(Click here to read that post ๐Ÿ‘‰Link๐Ÿ‘ˆ)

In the last post we created and stored the password and username of the user. So taking that as a base, now by getting that results we will command now to open another screen that means user needs to enter those details again to enter into home screen of the app. (Not only that we can automatically get that data of user but we will explain about it in next post).

Now let's completely know how to use and command this block in step by step.
[ For Direct blocks Image go to last of this post :) ]
In the last Tutorial we stored the Username and Password of the User so now we need to create the same components so that user can re-enter those details and enter the home screen or unlock certain functions in the app.
(Below we created the same components so that user will enter the details and Log In

Now go to Blocks Page and Drag the key Component to get the value of stored Data means that when user clicks Login once he entered the details then to compare the details with stored Details.
As the above example once the user filled up his name and password then he/she have to click Login Button to compare his Details and enter into the app or unlock certain options.

So here the key component is Login Button so when user clicks the button then we need to compare those details with stored details or stored Data.

Now attach the "If then" block to the key component as shown below.

Now attach "Equal" block to "if" block and attach "Username.Text" block to "Equal Block" left side and "Get Value" block to "Equal block" right Side and attach Empty string to Get Value Block and enter name Tag as shown below.

Now here we compared the Username so once the details are matched then to agin compare the password details we need to add another "if then" block to "Then" block as shown below and do the same command given above.

Here we compared both details so once the both details matched then to open another screen or certain options we need to give commands in the "then block" of send If then Block as shown below here we command to open another screen when details matched.

Total Block Image

Happy tHunking๐Ÿ˜Ž๐Ÿ˜Ž

Post a Comment