Default question values

Updated: June 8, 2021

In this article, learn how to pre-populate question fields with default answers.

Basics

If you want to pre-populate the questions of an app, you can use Default Values. Just click on the question you want to pre-populate to access the Question Settings. In the Question Settings, there is a combobox that you can use to set a default value:

The default value combobox

Using the Default Value combobox, you can either type in the information you want to pre-populate the question:

...or you can select a variable from the Default Value combobox dropdown:

The only restriction is that the Default Value you select can only be of the same datatype as the Question (e.g. a Date question can only be pre-populated with dates).

Once you've set a default value, that value appears in the answer field when the enduser of your app reaches that Page block:

The enduser can either leave the default value as-is or type in their own response.

Advanced: Set default values for Loop Sections

When using variables as default values for Questions in Loop Sections, you must first select the list variable you want to retrieve those variables from. For example, let's say you have a database table called Shareholders:

And in your app, you query that database to retrieve the list of shareholders associated with the company using the app:

You must first select the variable defined by that query block as the List Scope for the Questions in your Loop Section...

...so that you can then select any of the variables contained within that list:

Now when your enduser reaches the loop section and clicks to add the first loop member, they will see the name of the first shareholder in the list pre-populated into question, and so on for each run through the loop section questions.

Expert: Pre-populate apps with values from database

Frequently Asked Questions

Don't see your question? Get support.
No items found.

On this page

Hire an Afterpattern expert

Go from idea to launch in weeks.

View services