This article explains how to add a date range Lock to a Form, Subform, Folder or Database to prevent users from adding or editing Records that belong to a particular time period.
By adding a date range Lock you can preserve versions of the Records (after they have been validated by your information management processes, for example) and make sure that no user can edit them.
A date range Lock can be set on any Form or Subform that has a Date, Month, or Week Field marked as a Key field or on any Database or Folder containing a Form with such a Key field.
Locks can be set as active or inactive, allowing for temporary suspension of a lock when locked Records need to be edited. For more information, see Suspending or Deleting a Lock.
Alternatively, you can add a rule based Lock.
How to add a date range Lock
To create a date range Lock in your Form, Subform, or Database, follow these steps:
- Make sure that the Form or Subform contains a Date, Month, or Week Field marked as a Key field.
- On the Database List page, click on the Database that contains the Form you want to add a Lock to.
- Click "Database settings."
- Navigate to the Form or Subform to which you want to add the date range Lock.
Click on the arrows to reveal the contents of Folders, if needed. - In the Resource side panel of the Database Design section, click "Locks" to open the Locks tab.
- Click "Add date range lock."
- Give a descriptive name to the Lock.
- Select the starting date and the ending date for your Lock. Click on the Calendar icon to reveal a Calendar or type the date following the format "YYYY-MM-DD".
- If the “Active” checkbox is checked, the Lock is active. If the “Active” checkbox is not checked, the Lock is temporarily suspended. You will still be able to view it it in the side panel.
- Click on "Save" to save the Lock.
Result: You created a Lock.
Note that when a date range Lock is assigned at the Form level, the following Fields will not be locked:
- Other Forms within the Database without the Date Key fields
- Other Forms within the Folder (assuming the Form is part of a folder) without the Date Key fields
When the Lock is active, users trying to add a Record for the locked period of time, they will get a warning and won't be able to save the Record.
Note that when a date range Lock is assigned at the Form level, the following Fields will not be locked:
- Other Forms within the Database without the Date Key fields
- Other Forms within the Folder (assuming the Form is part of a folder) without the Date Key fields