3.4. Ensuring Integrity
In the previous section, you added a default value to make data entry easy for your end users. Your users want ease of use, but your primary concern should be the accuracy of the data that is accessed by the application. You can add features to your application that not only make it easier to use but also ensure that the data entered has an appropriate value — that the data entered has complete data integrity. These features will be covered in this section.
3.4.1. Limiting Values
You have to start with the assumption that the users of your application want to do the right thing — they just may not know what that is. Thankfully, there are a number of standard user interface objects that make it possible to limit values, either to a set of known values or to a dynamic group of changing values.
The best place to start learning about these options is with a choice that is pretty simple — the column in the PRODUCTS table that specifies whether a product is in stock.
3.4.2. Radio Buttons
The PRODUCT_AVAIL field, in the PRODUCTS table, can logically accept one of two values — Y if the product is available or N if the product is not. Rather than expecting a user to know what values to use, your application would be both easier to use and more foolproof in terms of data integrity if you limited the user choices for data entry to those two values in a list of values. Lists of values underlie several different user interface choices, as you will see in this chapter. ...
Get Beginning Oracle® Application Express now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.