Enforcing data
Earlier in this chapter, we explored how Business Rules can validate information, ensuring that data is consistent and appropriate. For example, we ensured that departure dates are always after arrivals. However, writing a script for every situation is an administrative overhead. Reduce it by using a data policy, which allows definitions to be made without writing a single line of code.
Note
Data Policies are another of the point-and-click functionalities available. Try to data policies when possible, and use Business Rules otherwise.
Data policies enable you to specify whether fields in a table should be mandatory or read-only under certain conditions. The conditions can only apply to the current record, which means the script that checks for multiple lead passengers cannot easily be replicated with a data policy.
Forcing a comment using a data policy
Let's ensure that a user cannot change a Check-in
record that is in the past unless there is a comment to explain the situation...