Send data from an app

Updated: March 8, 2020

If you want to save data collected by your app, you must send it to a database. You can send all manner of data from an app to a database, including documents and analytics information (data regarding how often people use your app).

In this lesson:

How to send data

Sending data from your app is a relatively simple two-step process:

Step 1. Add a Send Data function to a Page Block

You send data from a Page Block using the 'Send Data' function: 

When you add a 'Send Data' function, you must select where you want to send the data to. When you select 'Workbase', you'll be prompted to select which Workbase (you can have multiple) and which table within that Workbase.

You can only send data AFTER you collect it
You can only send data that has been defined in prior Page Blocks. You can't send data from the same Page Block where it is being collected.

Step 2. Specify what data you want to send

You decide exactly what data is sent to your database. When you click "+ Add", you can specify what column in your database you want to populate and what data you want to populate it with:

When you select what data you want to populate in the database column, you can either select a variable or type a value in directly.

Sending key values

Remember, the left-most column in your database is the "key column." The value stored in this column must be unique for each row.

By default, when you send data from your app you are automatically assigning a random but unique value (a 32 character string):

You can choose anything to be your key column, just make sure that it's unique per user.

How to update existing rows

Whether your 'Send Data' function creates a new row or updates an existing row depends entirely on the value sent to the key column.

If you send data to a database and the key column value you send is equal to an existing key column value, the app will not create a new database record but instead will update that pre-existing record.

Sending data from a Loop Section

If you app includes a loop (also known as repeating questions), you can send that data to a database so that each loop member creates a new record (a row) in your database. Learn how.

Send variables to matching columns

If  your app's variables have the exact same name as a columns in your database, then the variables are "matching" and you can use this feature.

These variables match the database columns:

On this page

Hire an Afterpattern expert

Go from idea to launch in weeks.

View services