Skip to main content

Create Queries

Last updated 6/04/2022

Add a Single Table Query

You can use a query to request data from the database. Five will give you access to all your tables held in the database in the Table and Fields Designer. Selecting a table will make it available on the Designer for you to work with and build out your queries.

  1. Select Queries in the menu.

  2. Click the Add Item button in the list app bar.

  3. Type a title in the Title field.

  4. Click in the Query field to open the Table and Fields Designer.


Add a query
Figure 1 - Add a query

  1. Click the Add Table button.

Add Table Button
Figure 2 - Add Table button

  1. Select the table name.

Select Table Name
Figure 3 - Select table name

  1. Click out of the Table Selector dialog box to close the window.

  2. Select the table and drag to where you would like it to be positioned on the Designer.

  3. Double click the field name.


Add a Query Field
Figure 4 - Add a query field


info

After selecting a field it will be added to the Query Builder.


  1. Click the Save button in the Table and Fields Designer app bar.

Save the Query
Figure 5 - Save the query

  1. Click the Fields tab.

Fields Tab
Figure 6 - Fields tab


tip

All query fields will be listed on the Fields page and can be edited here.


  1. Click the Save button in the form app bar.

Save the Form
Figure 7 - Save the Form


warning

Ensure to click the Fields tab to have all your query fields saved before committing the form.


Add Mulitple Fields

  1. Double click the first field name.

  2. Continue to double click the field names required for the query.


Add Multiple Fields
Figure 8 - Add multiple fields

Add a Multiple Table Query

Requirement

There needs to be a relationship between the tables, or the tables can be connected via another table.

  1. Select Queries in the menu.

  2. Click the Add Item button in the list app bar.

  3. Type a title in the Title field.

  4. Click in the Query field to open the Table and Fields Designer.


Add a query
Figure 9 - Add a query

  1. Click the Add Table button.

Add Table Button
Figure 10 - Add Table button

  1. Select a table.

  2. Select table two.


Add Multiple Tables
Figure 11 - Add multiple tables

  1. Click out of the Table Selector dialog box to close the window.

  2. Select each table and drag to where you would like it to be positioned on the Designer.

  3. In table one, double click the field names required for the query.

  4. In table two, double click the field names required for the query.


Add Query Fields
Figure 12 - Add query fields


info
  • While the Table Selector dialog box is open, you can choose all of the required tables or return later if you need to add another table to your query.

  • The tables can be moved around the Designer until you are happy with the design layout.

  • For linked tables, Five will create the relationship line and the relationship type.


  1. Click the Save button in the Table and Fields Designer app bar.

Save the Query
Figure 13 - Save the query

  1. Click the Fields tab.

Fields Tab
Figure 14 - Fields tab

  1. Click the Save button in the form app bar.

Save the Form
Figure 15 - Save the Form


tip

All queries you make using the Table and Fields Designer will require you to:

  1. Click the Save button in the Table and Field's Designer app bar.

  2. Click the Fields tab.

  3. Click the Save button in the form app bar.