Skip to main content

Build the AIS Tables

Last updated 8/01/2024

The AIS application has three tables, the iUser table is already created for you by Five, so there are only two tables that need to be added. This documentation will explain how to create the tables for the AIS application.

The AIS database model below shows the relationships between the tables. The Submission table holds all the submission details and the SubmissionAttachment table holds the attachment details and the attachment. There is a one-to-many relationship between the Submission and SubmissionAttachment tables, meaning a submission can have many attachments. Five handles the iUser table.


AIS database model
Figure 1 - AIS database model
Prerequisite: Signed in as a Developer or Control user.

1. Click Applications in the menu.


Applications menu item
Figure 2 - Applications menu item

2. Select the AIS record in the list.

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


Manage button
Figure 3 - Manage button

4. Click Data in the menu.

5. Click Table Wizard in the sub-menu.


Table Wizard menu item
Figure 4 - Table Wizard menu item

Add the Submission Table

tip
Five creates your primary key when creating your table with the Table Wizard!

1. Type Submission in the Name field.


Add the Submission table
Figure 5 - Add the Submission table

2. Click the Add Fields button.

3. Type InvoiceNo in the Name field.

4. Click the lookup icon in the Data Type field and select Integer.


Add the InvoiceNo field
Figure 6 - Add the InvoiceNo field

5. Click the Add Fields button.

6. Type CustomerNo in the Name field.

7. Click the Req. checkbox.

8. Type 20 in the Size field.


Add the CustomerNo field
Figure 7 - Add the CustomerNo field

9. Click the Add Fields button.

10. Type InvoiceStartDate in the Name field.

11. Click the Req. checkbox.


Add the InvoiceStartDate field
Figure 8 - Add the InvoiceStartDate field

12. Click the Add Fields button.

13. Type InvoiceEndDate in the Name field.

14. Click the Req. checkbox.


Add the InvoiceEndDate field
Figure 9 - Add the InvoiceEndDate field

15. Click the Add Fields button.

16. Type ContactEmails in the Name field.

17. Click the lookup icon in the Data Type field and select Memo.

18. Click the Req. checkbox.

19. Type 16384 in the Size field.


Add the ContactEmails field
Figure 10 - Add the ContactEmails field

20. Click the Add Fields button.

21. Type Status in the Name field.

22. Type 20 in the Size field.

23. Click the lookup icon in the Default Display Type field and select _Combo.


Add the Status field
Figure 11 - Add the Status field

24. Click the Save button in the Table Wizard app bar.


Save button
Figure 12 - Save button

25. Click the Save button in the Table Upgrade window.


Save button
Figure 13 - Save button

Add the SubmissionAttachment Table

1. Type SubmissionAttachment in the Name field.


Add the SubmissionAttachment table
Figure 14 - Add the SubmissionAttachment table

2. Click the Add Fields button.

3. Type Name in the Name field.

4. Type 255 in the Size field.


Add the Name field
Figure 15 - Add the Name field

5. Click the Add Fields button.

6. Type Attachment in the Name field.

7. Click the lookup icon in the Data Type field and select Binary.

8. Click the Req. checkbox.

9. Type 167772150 in the Size field

10. Click the lookup icon in the Default Display Type field and select _DocumentUploader.


Add the Attachment field
Figure 16 - Add the Attachment field

info
Five's display type _DocumentUploader enables a user of your application to upload a document simply by clicking in the field, navigating their files and opening the required file.

11. Click the Next button.


Next button
Figure 17 - Next button

12. Click the Add Relationships button.

13. Click the lookup icon in the Table field and select Submission.

tip
Five creates your foreign key when you establish a relationship with another table.

14. Click the Required checkbox.


Add the Submission relationship
Figure 18 - Add the Submission relationship

15. Click the Save button in the Table Wizard app bar.


Save button
Figure 19 - Save button

16. Click the Save button in the Table Upgrade window.


Save button
Figure 20 - Save button

tip
You can find your table records in the Tables view, located under the Data menu!