1 of 9

Persistence:

Stored and Cloud Variables

Thunkable

2 of 9

Thunkable: Two Methods for Persistence/Shared Data

Persistence and Shared Data in Thunkable

Spreadsheets

Data Sources

Persistent Variables

Designate variables as persistent cloud

AirTable Database

3 of 9

App, Stored, and Cloud Variables

You can choose the persistence level for a variable.

What does each mean:

app?

stored?

cloud?

4 of 9

App, Stored, and Cloud Variables

What does each mean:

app: variable is transient and “dies” when app closes

stored: variable is stored in database on device. Data is still there if you close and reopen.

cloud: variable is stored in database on web. Data is still there if close and reopen, and all app instances (users) have access

5 of 9

Apps Can have either Private or Shared Data

Use stored variables for private apps. Each user has his or her own copy of data stored on device

Use cloud variables for shared data apps. Data is stored in one shared place, on web

6 of 9

Initializing Stored/Cloud Variables

  • app variables can be given value in “initialize” block.
  • stored/cloud variable have no slot for initializing.

  • Initialize cloud vars in “when Screen.Opens”

null means “never set”

7 of 9

Initializing Stored/Cloud Variables

Initializing a number variable

Initializing a list variable

8 of 9

Notifying Other App Instances of a Change

  1. Jill’s app instance changes variable
  2. All other app instances are notified with “when variable initializes or changes” event

Jill

Shondra

Egbert

cloud variable

9 of 9

DEMO: Shared click counter