An Example of the Effects of a Layout Control
As described in Designing a Layout Control, the sample application's Rental Agreements Layout Control enables and disables fields on the Rental Agreements form to provide users with a visual indicator of the current phase of a Rental Agreement and what fields are currently available for editing.
The sample application defines three phases for a Rental Agreement:
- Check-Out: This is applicable to new records. When checking out a vehicle, only the Check-Out related fields are applicable. The Check-In related fields cannot be modified. See Form in Check-Out Phase.
- Check-In: Once a vehicle has been checked out, the Check-Out fields can no longer be modified and the Check-In fields are now available. See Form in Check-In Phase.
- Complete: Once a vehicle has been checked in, the Rental Agreement is complete, and no additional changes can be made to either Check-Out or Check-In fields in the Rental Agreements record. See Form in Complete Phase.
The validation to enforce a Rental Agreement's phase is defined in the Rental Agreements Entity Object. However, without the Layout Control, all fields on a Rental Agreements record would appear enabled regardless of the current phase of the rental agreement (as shown below). In this case, a user would not be notified of any validation errors until he or she attempts to save the record.
With the layout control linked to the Rental Agreements form, the set of available fields update automatically depending on the current phase of the Rental Agreement.
Form in Check-Out Phase
During a vehicle check-out, only the Check-Out fields are enabled on the new Rental Agreements record. Check-In fields are disabled, as shown below.
Form in Check-In Phase
While a vehicle is checked out, only the Check-In fields are enabled on the Rental Agreements record (so the vehicle can be checked back in when returned). Check-Out fields are disabled, as shown below.
Form in Complete Phase
While a vehicle has been returned and checked in, the details of the Rental Agreement can no longer be modified so all Check-In and Check-Out fields are disabled, as shown below.
Copyright © 2014-2019 Aptify - Confidential and Proprietary