Syncing of App/Stored/Cloud Variables

Hi Thunkers,

My learning curve (and some known bugs) has meant that this is now the third time I am changing the fundamentals of my app. I guess I have been experimenting and learning up until now but I think I am
needing to finish it as the App is only one part of a larger project.

As many of you know, there is still some Thunkable development to do in order to get stored variables working with lists and sublists. The variable listener block also seems to have issues with lists and sublists.

I have however discovered that stored variables and the listener works flawlessly with single level variables (variables not in a hierarchy). So I intend to use the following logic and I seek some insight on whether to do this or persist with either Json or other lists hierarchy formats.

This is what I am thinking.

I create single line parsing strings with deliminators. (Thunkable blocks are sufficient for creating and parsing strings into data levels and data chunks). I would sync three equal string Variables.

  1. Cloud Parsing_str ; used across all devices and is the basis of my sync data. stored in Firestore Cloud (Realtime database).
  2. Stored Parsing_str; used to store the strings on local devices between sessions. Upon start, I would check if equal with cloud and update the Stored variable from the cloud if not. (just in case a different device has been used between sessions on the active device).
  3. App Parsing_str ; used for quicker session possessing especially in loops and searches.

During a session I would use only the App Variable and set the listener to update both Stored and Cloud to this Session Variable upon change.

I have tested this at low level and it seems to work well but I really would like the input of experienced programmers before I change my method for the third time :crazy_face:

My apologies if my layman jargon does not make sense.

Thanks in advance.

Thanks @eddie.rebehy - would you mind linking to some of your previous posts too just so we can have a bit more context around the type of app you’re trying to build.