Models Overview

Models organize and store data in App Maker. You can think of a model like a table in a database or a sheet in a spreadsheet. Spreadsheets organize data using named column headers, and store it in the sheet's rows. Similarly, models organize data into named fields, and store it in collections called records.

For example, imagine you work for a new startup, Weyland Corp, and are assigned to build an HR app that tracks employees' names, ID numbers, and dates of birth. In App Maker, you could make an Employee model with three fields: Name, EmployeeID, Active and DateOfBirth. You'd then create a UI to populate that model with a record for each employee. Alternatively, here's how the data would be represented in a spreadsheet:

NameEmployeeIDActiveDateOfBirth
Carter Burke2179426False03/30/2150
Ellen Ripley1612122True01/7/2092
Two records for the Employee model

Types of models

There are five types of models:

The model editor

The model editor is where you define the structure and settings of your models. App Maker directs you to the editor after you create a model, and you can return there at any time by clicking your model's name in the left-hand nav bar. The editor has six tabs:

Display Field

When a model is selected in the left sidebar, a dropdown for selecting the default display field appears in the action bar. Choose a display field specifies which field to use when referring to a record of that model. A display field is commonly used for widgets that select a record like dropdowns. An alternative approach is to specify the display field by binding the names property of a widget to the field you want to display.