Databases Reference
In-Depth Information
Example Scenario
The example in this chapter is built around the need for dynamic constraints on the values entered into
a date field. The current date item allows you to select a min and max date, as shown in Figure 3-1.
These constraints can be either static dates or references to a variable using the &ITEM_NAME. (substitution
string) notation.
Note For more information about the &ITEM_NAME notation mentioned earlier, and about different methods to
reference variables, please read the following article: http://www.talkapex.com/2011/01/variables-in-
apex. html .
Regardless of how you define the min/max constraints for a date field, they are calculated once
when the page is loaded. As a result, the date constraints don't dynamically change as the user is
working on the page.
Figure 3-1. Standard date item settings
A classic example of when you would want dynamic min/max date constraints is when booking
return airplane tickets. You normally select the date you're leaving on and then select the date you're
coming back on. When you select the return date, you can't select any dates before the date you leave
on, as shown in Figure 3-2. The current min/max date options in the standard APEX date picker don't
support this functionality.
 
 
Search WWH ::




Custom Search