how can you save the state of a view ?

the documentation by garmin is almost non existent. storage or properties does not work, except in the simulator. specifically, i want to only save a number... tried everything. note that i want to initialize a value for this number only once, or when settings are changed.