Compose
You can begin creating variables and variable fields in Chorus once you have your mobile app created and have at least an initial mobile interaction page. Remember, as explained in our article about getting started with data, variables and variable fields are effective ways to collect, organize, and access your client data.
You can think of a variable as being the name of a data table and the variable fields as the column headers on that data table.
Creating a new variable
To begin working with variables and data, navigate to the Compose page (below we've already set up a basic Mobile Interaction page). Select "Variables" in the upper right side of the Compose box, highlighted in the green box below. This will open the variables editing box.
The process of creating a new variable within the variables editing box is the same for both Client and App variable types. Simply, click on the New Variable box to open the editing menu. Once you've opened the variables editing box, within the box you will notice two main sections: Client Variables and App Variables. We've outlined the differences between these two variable types in our help article here. As a reminder, think of App Variables as the variables that will be relevant for all users of an app and think of Client Variables as those that are specific to the entries of a particular client.

From the variables editing menu, you can select Single Item or Collection. A single item variable means that your variable can only store one value at a time. This is useful for collecting information that will not change, such as a user's birthday. A variable collection means you are able to store multiple values associated with a unique variable. This is useful for collecting information where there can be multiple answers, such as collecting the make, model, color, and year of each of a single user's cars.

Give your variable a name and click "Add" to save your variable.

Once your Variable is created, you can begin creating the fields that will serve as the different dimensions of your variable. Remember, one variable can have multiple fields.
Creating a new Variable Field
Once you've created a variable, you can begin adding variable fields that correspond to the variable you've created. Variable fields will help you organize and properly store the information your users input.
Let's begin: To create a new variable field, hover over the variable you've created to display the "New field" button.

Click on the "New field" button to open the editing menu where you can select the field type, field name, and default value. Below we've outlined the variable field types and explained how and when to use each:

- Text: allows you to collect text information related to a variable. This can be used to collect data from a text input field or text input area for instance.
- Number: allows you to collect numerical information from your app.
- Date & Time: allows you to collect date and time information from your app.
- Reference to many: This is how you will connect information at the app variable level and associate it with a specific user of your app.
- Reference: This is how you will connect information at the app variable level and associate it with a specific user of your app.
- Audio: allows you to collect audio files users upload in your app.
- Video: allows you to collect video files users upload in your app.
- Image: allows you to collect images users upload in your app.
- File: allows you to collect files users upload in your app.
Once you've configured your field settings, select "save" to add the new field to your variable. Your field will then appear in the list of fields connected to the variable you've set up in the variables editing box.

To open the variables editing box, simply select Variables from the Compose page at any time.
Next Steps
Now that you've created some variables, let's connect Client and App Variables!
Comments
0 comments
Please sign in to leave a comment.