How to save and retrieve an app variable?

Hi folks.

I have an app variable called “relator”. it is a number. I’d like to save it to the phone and then retrieve it later.

How is this done in appgyver?

Thanks

use this function to set the value in storage

and this to retrieve it

1 Like

Thanks. But, I am unclear about where the data is placed after the get function executes.

they get stored in the device and then you can retrieve them, theres no reason for you to know where they get stored.

Get item says it outputs the stored value at port 1. So what do I connect to port 1 to actually retrieve the data?

ohh, ok, i see so take a look bellow
so in the get item from storage, use the same key as you use in the set item to storage

then, you can assign the output value (stored value) to any page or app variable like this

I see. But now the issue is when i try to bind to the output value of the node the get item from storage option says item incompatible.

it will work from the formula

(ignore the error messages)

OK. Got it. Thanks! Using the formula did the trick. Thank you!!

1 Like