FAQ

How to send checkbox question data to a database

March 30, 2021

Checkbox variables create a list of boolean (true/false) values, one for each checkbox option. A checkbox option is True if the end-user checks it off (and False if the end-user does not check it off and submits the Question Page to continue through the app).

Once we understand this, we can approach the problem of sending Checkbox variable data to our database in two different ways:

Option 1: Create new variable that is equal to checked off values

Use an Expression Block to create a new variable that is equal to a comma-delimited list of checked off values, like this:

After you create this new variable, you can send it to a column in your database.

Option 2: Create columns in your database for each checkbox option

Remember, a Checkbox variable is essentially a list of boolean (True/False) values. If you create a column in your database for each of these Checkbox options, you can then send the value of True or False to that column depending on how the end-user interacts with the Checkbox question.

Hire an Afterpattern expert

Go from idea to launch in weeks.

View services