Auto-Assign Default Values lets you set the value that appears in a date field when a user is creating or editing a record. Defaults can be a simple date calculation (for example, today plus 1 weekday) or a conditional default based on other fields the user fills in (for example, if priority is high, the date is today plus 5 days).
Defaults help make sure the right dates (and the alerts that follow them) are added for each record. You can also lock these fields so users can't change them manually, and decide what happens to the date when a record is edited.
Table of Contents
Adding a Date Field in the Form Template
To add a date field to your database, or apply this setting to an existing date field, open the Form Template for the relevant database.
Once the Manage Custom Form page is open and a section has been created, click date (highlighted below) in the Elements options to add your date field.
The date options then appear on the left of the screen. Default Values, Lock Selection and Default Value Edit Behaviour are on the Settings tab, and Conditional Default values are configured on the Conditions tab (both pictured below).
Default Values
The default values field creates a basic default that appears when a user adds a new record, based on a simple calculation such as today plus 5 days.
The value appears for every user who can view that date field. Users can still change it, unless Lock Selection is enabled. If you also have conditional default values and a condition is met, the conditional default is used instead.
None
The default option. No value is pre-populated in the field.
Today
Loads the user's current date and/or time, from the moment they clicked Add Record. This replaces the earlier Default to Today setting.
Custom
Custom creates a simple rule based on another date, such as today plus 5 weekdays (pictured below), which sets the date to 5 weekdays after today.
When Custom is selected, these options are available:
| Option | Description |
|---|---|
| Date Fields | The source the calculation is based on. Choose Today, any date field in the current form (except those in duplicable sections), or a date field from a Single Lookup (see below). If the source date field is on a future stage (a stage after the one this date field is on), the default is only applied when the record is reverted or continued. |
| Plus / Minus | Whether the amount is added to or subtracted from the source date. |
| Numeric Value | How many of the chosen timeframe to add or subtract. There is no limit, as long as it is a number. |
| Timeframe | Weekdays, Days, Weeks or Months. Weekdays currently covers Monday to Friday only. |
Using Lookup Date Fields as a Source
You can use another database's date field as the source, as long as it has been added to your current database through a Single Lookup Select field. The date field in your record then defaults to a date based on the date field of the record chosen in that lookup.
If the date changes on the lookup's record, your record is only updated (as required) the next time it is edited.
Lock Selection
When Today or Custom is selected under default values, or conditional default values have been added, a Lock Selection option appears. When enabled, the user adding the record cannot change the value. They can only view the date that was filled in automatically.
Default Value Edit Behavior
When a user edits a record that already has date values, their changes may affect the default, for example through a conditional default. This setting decides whether those changes update the date or not. It only applies when editing a record.
The setting only appears when Today or Custom is selected as a default value, or a conditional default has been added on the Conditions tab. Your choice applies to every condition on this date field, and still applies when Lock Selection is enabled.
| Option | What Happens on Edit |
|---|---|
| Only apply when field is empty | The default, pre-selected option. Defaults are only applied when the date field is empty. |
| Override existing saved values | Replaces the saved date with the new one according to the conditions. This happens automatically as soon as the user opens the record, or changes a value that triggers an update. |
| Allow user choice | Lets users decide whether to apply the change. When they make a change that would update the date field, a popup (pictured below) lets them Skip or Apply it. Only the date field named in the popup changes, not the field that triggered it. |
Creating Conditional Defaults
To set defaults based on other fields in the record, add conditional default values. These use If and Then conditions, so a default can depend on multiple conditions and user inputs.
Conditional defaults are added on the Conditions tab. When a condition is met, it overrides the defaults on the Settings tab. Each date field can have multiple conditional defaults, and if they conflict, their order in the conditions list decides which one is used. You can name each condition to tell them apart, or a name is added automatically.
If Condition
The If condition is the trigger. When it is met, the Then settings below are applied. For example, with Priority = High as the If condition, the date field could default to 5 days from today.
You can add up to 10 If conditions to the same condition. The options are:
- And / Or: as with other conditions in the platform, this sets how the condition works with the next If condition. With And, every If condition must be met. With Or, any one of them can be met.
- Field Selection: a list of fields in the current form. The type of field you choose determines the remaining options. Notes, Lookup fields and fields in duplicable sections can't be selected.
Then Condition
The Then condition sets what happens when the If condition is met. Its options are the same as the Custom default on the Settings tab.
Saving Your Condition
When you have added all your If and Then conditions, click Add to add the condition. You still need to click Save on the date field to apply it. See the example below.
Conditions List and Priority
Once a condition is added, a list view shows every conditional default on this date field, with the If and Then rules for each.
Order matters: if conditions conflict, the one higher in the list is used. To reorder, click the arrows icon to the left of the Edit icon and drag the condition into place, as shown below. Click Save & Close on the date field to save the new order.
Restrictions
- A maximum of 10 date fields per database can have conditional defaults. This limit does not apply to default values.
- Date fields in duplicable sections can only use the default values setting, and only the None and Today options.
- If a date field is the Title field, you can't add conditional default values to it.
- If a date field is Mandatory and Lock Selection is enabled, only other mandatory date fields can be selected in its conditions, so there is always a value.
- Time Selection is supported, but you can't yet set a specific time in a condition or default. Default values are set to midnight.
Complex and Advanced Scenarios
| Copying a Staged Record | If a Staged Record is copied and a date field's source date is on a future stage, the default date does not update yet. It updates once the record has been reverted and continued. |
| Time Selection mismatch | If a date field has Time Selection enabled but its source date does not, there can be a 24-hour difference between the two fields. This is because time fields are calculated in UTC. |
Default Date Values on Add Record
Once defaults are set up, users click Add Record and fill in the record, and the date fields fill in automatically as conditions are met.
The example below shows three cases:
- Output Due Date depends on the Output Type selected, since some outputs take longer to produce. This uses a conditional default.
- Due Date depends on Priority: High sets it to today plus 5 days, Medium to today plus 10 days. This also uses a conditional default.
- Final Submission Date fills in after a Launch Date is chosen, set to 5 days before it. This uses the custom default value.
Default Date Values on Edit Record
When a user edits a record, the option chosen in Default Value Edit Behavior applies. If the date field is blank, the default is always filled in.
Allow User Choice on Edit Record
If Allow user choice is enabled and the user updates a field that would change the date field, a popup lets them Apply or Skip the change. In the example below, changing the Launch Date brings up the popup.
Apply to Subsequent Fields
If one change updates several date fields, the user may see several popups. Each popup includes an Apply to subsequent fields option. When it's selected, the user's choice (Skip or Apply) is used for all the remaining fields too.
Updates via a Lookup Record
If a change on another database's record (through a Lookup Date field used as a source) would change a default on the current record, the user sees a popup when they click Edit or Revert / Continue Record. Like the Allow user choice popup, it says what changed and which date field it affects, and the user can apply or skip it.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article