Auto-Assign Date Field Default Values

Modified on Fri, 13 Nov at 8:42 AM

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.

Note: This feature is set up in each database's Form Template, and is currently only supported for date fields in the Databases module.

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.

Date element in the Form Builder

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).

Settings and Conditions tabs on a Date field

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.

Default Values options

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.

Custom default value rule

When Custom is selected, these options are available:

OptionDescription
Date FieldsThe 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 / MinusWhether the amount is added to or subtracted from the source date.
Numeric ValueHow many of the chosen timeframe to add or subtract. There is no limit, as long as it is a number.
TimeframeWeekdays, 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.

Lock Selection setting

Note: Main Admin users, and users with Admin permission on the Database Records module, can still change the date when Lock Selection is enabled.

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.

Default Value Edit Behavior options

OptionWhat Happens on Edit
Only apply when field is emptyThe default, pre-selected option. Defaults are only applied when the date field is empty.
Override existing saved valuesReplaces 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 choiceLets 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.

Allow user choice popup

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.

Conditional Default Values on the Conditions tab

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.

If condition options

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.

Then condition options

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.

Adding and saving a Conditional Default

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.

Reordering conditions by drag and drop

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 RecordIf 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 mismatchIf 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.

Date fields filling in automatically on Add Record

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 or Skip popup on Edit Record

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.

Apply to subsequent fields option

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.

Popup for a change made through a Lookup record

Note: The terms 'Database' and 'Record' are customisable, so they may appear differently in your platform. See the related terminology.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article