Adding Database Field Constraints

This lesson will go over how to create database field constraints in order to make an entry field mandatory or warn the user if a field is left empty.

In the following example we will make the DOB (Date of Birth) field mandatory in the customer's entry form.

Add A New Database Field Constraint

  • Select the 'Database Field Constraints' by clicking on 'Admin' from the menu bar.
Add A New Database Field Constraint

You will be directed to a 'Database Field Constraints List'.

  • Create a new constraint by clicking on 'New' in the tool bar.

Database Field Constraints Entry

  • Fill in the Entry form by choosing the 'Table' you wish to prompt and the 'Field' you wish to make mandatory from the dropdown menu.
    For our example we will select 'Customers' from the 'Table' list and 'DOB' from the 'Field' list since we would like to make the Date of Birth a mandatory field in the Customer's entry form.
  • Check off the 'Mandatory' box then 'Save' your new entry.
    Note if you do NOT check off the 'Mandatory' box, the user will still see a warning if they miss entering the DOB, but all warnings can be ignored by the user.
Database Field Constraints Entry

You will be redirect to the 'Database Field Constraints List' where you can comparably see that the DOB is mandatory and the Citizenship field is optional.
As noted earlier, when you add a non-mandatory constraint field, the system will still warn the user if the field is left black, yet they will be able to ignore the warning and carry on without filling in the field.
Conversely, if you add a mandatory constraint field, the system will warn the user if the field is left black, and they will not be able to ignore the warning or carry on without filling in the required field.

0 Comments

Add your comment

E-Mail me when someone replies to this comment