Introduction
Last updated 19/10/2023
Five's Table Wizard is a fast and simple way to add your tables, as it automates a lot of configurations that are required for a table to be saved to the database.Locate the Table Wizard
1. Select Data in the menu.2. Select Table Wizard in the sub-menu.
Figure 1 - Table Wizard menu item
tip
Once you have saved a table with the wizard you can find the record in the Tables view where you will be able to edit the record!
Locate a Table Record
1. Select Data in the menu.2. Select Tables in the sub-menu.
Figure 2 - Tables menu item
info
All your table records will be listed here.
Figure 3 - Table records
Edit a Table Record
1. Select the table record in the list.2. Either click the Edit button in the form app bar, or click directly in a field.
Figure 4 - Edit button
3. Perform your changes.
4. Click the Save button in the form app bar.
tip
Click the tabs at the top of the form to move between the pages!
Figure 5 - Save button
What does the Table Wizard Create?
The Table Wizard will create the following for you.tip
You can edit any values and definitions created by the wizard!
Primary Key
When you name your table in the wizard, Five automatically creates the primary key using the table name and appendingKey
to the end. For example, if you name your table Sell, a primary key will be created called SellKey
.Below, demonstrates adding a Sell table with a field called Name. After the table is saved and you have a look at the Sell record, you can see a SellKey field and index have been created for the table.
Figure 6 - Primary Key
Foreign Keys
When you create a relationship with another table on the second page of the wizard, Five will automatically create the foreign keys.Below, demonstrates adding the Sell table and creating a relationship with the Portfolio table. After the table is saved and you have a look at the Sell record, you can see the foreign key to the Portfolio table has been created for you.
Figure 7 - Foreign Key
Index Keys
When you create a key field on the second page of the wizard, Five will automatically create the index that can be used for a fast search on the database or to create a unique index.Below, demonstrates adding the Sell table and making the Name field a unique index. After the table is saved and you have a look at the Sell record, you can see the unique index key has been created for you.
Figure 8 - Unique Index Key
Data Types
By default, Text will be the data type for each field, unless a key word is in the Name field. For example, if Date was the name of a field, Five would default the data type to Date.Below, demonstrates adding a Date field to the Sell table. Before adding the name, the data type is Text, once the field name of Date is added, Five changes the data type to Date. You can edit this if required by clicking the lookup icon in the Data Type Field and selecting a new type.
Figure 9 - Data Type
Required Field
To save a table, you must have at least one field that is required to have a value. The first field you add will be defaulted to Required, you can uncheck this, however, you must have at least one field that is required.Figure 10 - Required
Data Size
Each field is required to have a data size. You need to fill this in yourself, unless you have given your field a data type that Five knows the size. For example, if your field had a data type of Integer, Five removes the Size field as it knows the data size is 4.Below, demonstrates adding a field with a data type of Integer to the Sell table, the Size field is removed. After the table is saved and you have a look at the Sell record, you can see the data size has been set to 4.
Figure 11 - Data Size
Default Display Types
The default display type is how you want to display your data in your application. By default, it will be _Text, unless a key word is in the Name field or a specific data type has been selected. For example, if the data type Float was selected, Five would default the display type to _Float.2 limiting the decimal places.Below, demonstrates adding a Price field to the Sell table. When the data type Float is selected, Five changes the display type to _Float.2. You can edit this if required by clicking the lookup icon in the Default Display Type field and selecting a new type.
Figure 12 - Default Display Type