Introduction and Goals

Datastores are used to store data that is used in other parts of the application. They include some unique features to help with searching.


Create a new Datastore
Update data
Understand and create indexes

Datastore Video

Creating a Datastore

There are two ways to create a Datastore form. The first is just like any other Form, and the second is using the Bundle. Below you can see the bundle method. This is also covered in the video.

V5 Datastore Create

After clicking on the Create Datastore button and giving it a Name and Description, you are brought to the main form for Configuration.

V5-Datastore Create New

From here, you can open the Form Builder and construct your form. After saving the Form and returning to the Configuration screen, you are prompted to update the configuration. You will see the fields added in the builder added to the Field list.

Here's the Sites Datastore with a few fields added.

V5-Datastore with Added Fields

The fields with checks next to them are listed in the results table for the Datastore. The top field in the list is a link to the entry. However, you need data to make things work. Lets look at that.

Adding Data

There are two ways to add data to a Datastore form. The first is hand entry into the fields. The second is using a CSV file.

To add directly, go to the list of Datastore forms, select one, and then click 'New Record'.

Sites Form ready to add data:

V5-Enter Datastore Data

The only real difference between entering data on a Datastore form is that after submit you are still in a draft status. This allows the form to be easily updated.

Using a CSV

When you need to import (or export) a large amount of data, a CSV file is a great option. It's available by clicking on the three vertical dots next to the New Record button.

My suggestion is to enter a couple of records by hand, and then export them to get the format for the CSV file. Much easier to adapt records when you know the format.

Defining Indexes

Datastores have the most flexible search options available to Request Forms. They are made to be mostly static data (people, assets, sites, etc) that can change, but are meant to be searched by other resources. Searches of Datastore forms require Indexes. They are created either through the bundle or you can go directly to the Form in the consoles.

All of the fields that you add are automatically added with a single index, just one field. The indexes need to be Built (created in the database), but that's as simple as clicking the "Build Indexes" button. If you want a compound index (multiple fields), you need to add that on your own.

Example of Sites Form with indexes:

V5-Site with Indexes

In the Next Article

Now that you've created a Datastore, you get to create a Model to access the data.

Story for this Class

The Cleaning Request created in the previous classes is OK, but now we need to improve the User Experience and Workflow.