Hold input value on restart

I have several input field linked to an appvar object with several properties.
I than save them to an on Device list. as label and value. everything works ok up until I want these results to show on restart.

I know I had this working and something change but i cannot figure it out. My formula seems to be ok but not returning the values after restart anymore.

On restart I have a Get Record Collection that passes the values to the appvar object with several properties in the global canvas.
LOOKUP(FIND_BY_KEY(data.Depth1, “label”, “Liner Bottom”),“value”)
this doesn’t seem to work anymore or I accidentally tweaked it.

Here is what else I’ve tried. The formulas seems ok but I do not return any values to the input field.

outputs[“Get record collection”].records[INDEX_OF(data.DEPTH1, FIND(data.DEPTH1, item.label==“Liner Bottom”))].value
I have tried the output formula with static values and works but I cannot seem to get the index to work for me.

also this
FIND_BY_KEY(data.DEPTH1, “label”, “Liner Top”).value

I know there is a difference between List and objects but I think it can be done with formulas.

any help is appreciated.

can you share some images where you store the values and then where you get them from storage?
are you using an on device storage bucket or a the function set and get item to storage?

Looking at what you have, I think the formula you need is something like LOOKUP(FIND(data.DEPTH, "label", "TopPerf"), "value") – does that help you?

Tried it but does not work. Find does not allow me to enter "label, “topPerf” in that manner. I tried “label”== “TopPerf” but does not work even though it takes the formula.

Ah, yes, my bad :sweat_smile: the way I typed it isn’t actually correct now that I look at it again. Please check FIND’s documentation for correct usage, either directly in the tool or here: FIND - AppGyver

I did it properly but still does not work.
One way I know works is like this, “outputs[“Get record collection”].records[0].Depth” but I am unable to get index to give the position in place of the “0”. I have looked at multiple examples and i am doing it exactly like they do but after many months of failure and wasted time I have a feeling that these formulas are unable to retrieve / find data from an on-device list as it would from a REST API. Hoping as I get more experience I am able to get it one day.

The only way “and it is very inconvenient for me” that I can do this is to make an on-device list for every field I want to retrieve. I do have to put IF formulas to avoid adding several entries because I use “outputs[“Get record collection”].records[0].Depth” to retrieve it with a static “0”. For now it is a fix to test the app but I will want to come back before publishing the app and have a solid way to retrieve it.

Thanks for your help.