Keyed Data, to manage grouped lists of data, structured as key/value pairs, e.g.:

Data Set : Team1
Data Set : Team2
Store data using actions like Set, Add and Subtract.

Keyed Data - for GameSalad®

Prerequisite: The Basics & Extended Setup & Keyed Data unlocked X

Sending data to the back-end.

Step 1.

Add two new game level attributes as below:

Step 2.

Organise your data into groups/sets of data, with each individual data item identified by a key.

The name of each Data Set and Key may only be a maximum of 16 standard alpha-numeric characters, no spaces or special characters.
If you send numbers as values, these must be whole numbers (no decimal places).

You can specify certain actions to be taken on the server, e.g.:
Set - will set the value on the back-end.
Add - will add a sent numeric value to the value which is already stored on the back-end. (Only use if you send numeric values.)
Subtract - will subtract the sent numeric value from the value stored on the back-end. (Only use if you send numeric values.)

Now send these values to APPFormative™ as follows:

Retrieving the Keyed Data from the back-end server.

Step 3.

Create a T_KeyedData table with 10 columns, each of type text. This table will receive the list of values from the back-end server:

Step 4.

When you need to get the data from the back-end, request it from APPFormative™ as follows:

Please note the Parameters included in the URL:

DS is the name of your Data Set (here represented by DATASET_NAME) as sent when posting the score. Remember, this may not contain spaces or special characters.

LS is the number of key/value pairs returned from the Server. Keep this number low to conserve network usage for the user. If this parameter is ommitted, all available data will be retrieved.

Step 5.

The T_KeyedData table will now contain the list of data, the key in column 1, the value in column 2, starting on row 2. Please note that row 1 contains control data which is not part of the data list.

You can use a "Loop Over Table" behavior to cycle through the table and display the values.