This feature allows you to Auto-Assign Default values that will appear in Date fields when a user is creating or editing a Record. Date fields can have Default values based on simple Date calculations (ie Plus 1 Weekday) or more advanced Conditional Defaults; dependant on fields the user has filled out on the record (ie If Field in X, Date field is Plus 1 Weekday).
By creating these defaults, you can ensure the correct Dates (and subsequent alerts) are added, based on each individual record's requirements. Additionally, these fields can be locked so they can't manually be changed by users and you can also define the behavior required when editing a record.
It's important to note that this feature needs to be setup in each Database's Form Template and is currently only supported for Date Fields. This feature is currently only available in the Databases module.
This article contains an overview of the entire feature, as well as the additional configuration options. To jump to a specific section, click on one of the headings below.
- Adding a Date field in the Form Template
- Default Values
- Lock Selection
- Default Value Edit Behavior
- Creating Conditional Defaults
- Saving your Condition
- Conditions List & Priority
- Default Date Values on Add Record
- Default Date Values on Edit Record
Adding a Date field in the Form Template
The ability to create Default values is currently only available for Date Fields. To add a Date field in your Database or apply this setting to an existing Date field you will need to open the Form Template for the relevant Database.
Once the Manage Custom Form page is opened and a section has been created, click Date (highlighted below) in the Elements options to add your Date field.
Once the Date options have appeared on the left side of the screen, you can proceed with the options below. Note that Default Values, Lock Selection and Default Value Edit Behavior appear on the Settings tab, whilst Conditional Default values are configured in the Conditions tab (both pictured below).
The Default Values field allows you to create a basic Default that will appear when the user Add's a new record. This default will be based off a basic calculation, ie Today Plus 5 Days.
This value will appear for all users who can view that Date field. The user can still change the default value to their own selection, unless Lock Selection is enabled. If you have Conditional Default Values and the relevant condition is met, the Conditional Default will appear instead of the option populated by the Custom condition created below.
This is the default option for this field. If selected, no value will be pre-populated in this field.
Defaulting to Today will load the default Date as the current day and / or time of the user; from the moment they clicked the Add Record button.
Note that this setting has replaced the Default to Today setting that previously existed.
Custom allows you to create a simple condition rule based off another Date field within the form. It means that you can add conditions like 'Today plus 5 Weekdays', as pictured below. This would default the date's value to 5 Weekdays after Today.
The options when Custom is enabled include:
- Date Fields: Within this field users will select the source field the calculation will be based on. Users can select from Today, all Date fields from within the current form (excluding those from Duplicable sections) and Date fields from single Lookups (so the Date fields in the other Database will be the source - see more below).
- If the source Date field selected is from a future Stage (ie a Stage after where the Date field is), the Default will only be applied when the record is reverted / continued.
- Plus / Minus: This determines whether the value entered in the next field will be Added or Subtracted from the Date value selected in the previous field. For example you can choose if the Date will be Plus or Minus X amount of days.
- Numeric Value: This determines the number of the timeframe selected in the next field that will be added or subtracted. There is no limit to the number that can be entered here; provided it is a number.
- Timeframe: The options available here include Weekdays, Days, Weeks and Months
- Note that Weekdays currently includes Monday to Friday only.
Using Lookup Date fields as a Source
You can select another Database's Date field as a source date, providing it has been added to your current Database via a single Lookup Select field. This means that the Date field in your current record will Default to a date based on the Date field selected in the Record selected in the Lookup field.
Note that if the value is updated on the Lookup's Record, it will only be updated (as required) when the current Record is next Edited.
If "Today" or "Custom" for Default Values is selected or Conditional Default values have been added, a new field called Lock Selection will appear. When enabled, the user adding the record will not be able to change the value, but will instead only be able to view the Date that has automatically appeared.
Note that Main Admin users or users with Admin permission on the Database Records module will still be able to change the date even if Lock Selection is enabled.
Default Value Edit Behavior
When a user is Editing a record that has pre-exisiting Date field values, they may make changes which could change the Default value; based on Conditional Defaults for example. This setting allows you to decide if those changes should update the Default value or not, though only when Editing a record.
The setting will only appear if Today or Custom is selected as a Default Value or if a Conditional Default Date value has been added in the Conditions tab. The choice selected here will apply to all conditions added for this Date field only. If Lock Selection is enabled, the option selected in this field will still be applied if applicable.
The options available include:
Only apply when field is empty
The option to Only apply when field is empty is the default option and will be pre-selected. This ensures that the Defaults will only be applied to the Date field if the Date field is empty, ie no Date has been selected.
Override existing saved values
If selected, this will update the existing Saved value to a new one (according to the conditions). Note that this will occur automatically as soon as the user opens the record or changes a value which prompts a change to be made.
Allow user choice
Allow User Choice allows users to choose whether or not they want to apply a change to the Date field. When they make a change that would prompt the Date Field to be updated, a popup (pictured below) will appear allowing them to either Skip or Apply the change. Note that this will only change the Date field listed in the popup, not the field which prompted the popup to appear.
Creating Conditional Defaults
If you need additional Default options that allow you to set conditions based on other fields from the Record, you can add Conditional Default Values. This supports If and Then conditions, allowing you to create Defaults based on multiple conditions and user inputs.
Conditional Defaults are added in the Conditions tab and if the condition is met it will override the Defaults set in the Settings tab. For each Date field, you can create multiple Conditional Default Values. If there are conflicting conditions, the order these appear in the Conditions List will determine which one appears. You can add a Name to each condition to make it easier to differentiate between them, or a default name will be added automatically.
This allows the user to create the trigger which will prompt the default value to change. When the condition is met, the conditions set in the Then fields below will be applied. For example if Priority = High is added as the If condition, the Date field will default to be 5 days from Today.
Users can add up to 10 IF conditions to the same Condition. The options you can select for IF Conditions include:
- And / Or: As per other condition options in the Platform, you can select And / Or which will dictate how the condition will work with the following If condition added. If And is selected, the If conditions will be treated separately and each must be met. If OR is selected, then one or the other could be matched.
- Field Selection: This dropdown contains a list of fields from within the current form.
- The type of field selected in the Field Selection here will determine the rest of the fields in this field.
- Fields that are not available for selection include: Notes, Lookup fields and fields from within Duplicable sections.
- Fields that are not available for selection include: Notes, Lookup fields and fields from within Duplicable sections.
The Then condition will determine the action that will occur when the IF field condition above is met. The options for this field are the same as what is available for the Default Custom Conditions created in the Settings tab.
Saving your Condition
Once you have finished adding all of your If and Then Conditions, click the Add button to add your condition. You will still need to click Save on the Date field to apply these conditions.
You can see an example of this below.
Conditions List & Priority
Once you've added your Condition, you will see a List view of all the Conditional Default rules added for this Date field. In this view you will be able to see all of the conditions, and the If, Then rules set in each.
The order of the conditions will be important as if there are any conflicting conditions, the one higher up the list will be used. To update the order, click the arrows icon to the left of the Edit icon and drag and drop your condition to the required location, as demonstrated below. Save the Date field via the Save & Close button to save the new order.
There are a few minor restrictions surrounding this feature which are included below:
- A Maximum of 10 Date fields per Database can have Conditional Defaults. This restriction does not apply to the Default Values.
- Date fields from within Duplicable sections can apply the Default Values setting only, though the options are restricted to None and Today.
- If a Date field is the Title field, you will not be able to add Conditional Default Values.
- If a Date field is Mandatory and Locked for Selection is enabled, only other mandatory Date fields will be available for selection in the Conditions, to ensure there will be a value.
- Though Time Selection is supported, you cannot yet select a specific time as part of a condition or default. Default values will default to Midnight.
Complex / Advanced Scenarios
- If a Staged Record is copied and a Date field's Source Date is on a future stage; the Default Date will not currently update. It will only update once the record has been reverted and continued.
- If a Date field has Time Selection enabled, yet its Source Date does not have Time Selection enabled, there will be a 24hr difference between the two fields. This is because Time fields are calculated using UTC time.
Default Date Values on Add Record
Once the Default Date Conditions have been setup, users can click Add Record, fill out their record and the Date fields will automatically populate with the relevant Default value as conditions are met.
In the example below you can view a few instances of this. Firstly the Output Due Date field has a default that is dependant on the Output Type selected (as some outputs may take longer to produce than others). This is created via Conditional Defaults, as is the next example. The Due Date is also set using Conditional Defaults, this time based on the Priority field. When the user selects High the Due Date is + 5 Days, whereas when they select Medium, it is 10 Days. Finally you can also see the Final Submission Date Field populates after the user selects a Launch Date. This uses the Custom Default Values option and has a simple calculation which ensures the Submission Date is 5 days before the Launch Date.
Default Date Values on Edit Record
When the user Edits a record, the option selected in the Default Value Edit Behavior setting will apply. If the Date field is blank, the Default value will always be populated.
Allow user choice on Edit Record
If Allow User Choice is enabled on a Date field and the user updates a field which would change the Date field's value, a popup will appear allowing the user to decide whether they want to Apply or Skip the change.
You can see an example of this below, where a change to the Launch Date field prompts the popup to appear, allowing the user to choose whether they wish Apply the change or not.
Apply to subsequent fields
Users might also be required to fill out multiple popups if a change will update multiple fields. In this instance, they will also see an option on the popup to Apply to subsequent fields. If this is enabled, whatever the user chooses (Skip or Apply), will also be applied to any other fields and they will automatically be either updated or left with the current value.
Updates via a Lookup Record
If a change has been made on another Database's Record (via a Lookup date field) that has prompted a Default value to be changed on the current record (as it is a Source field), the user will see a popup when they click Edit or Revert / Continue Record. Like the Allow user choice popup, this will inform them that a change has been made and which Date field that will affect. The user can then apply or skip the change.
To find out more about Date Field Defaults, contact your Customer Success Manager. To share your feedback or enhancement ideas about this feature, contact firstname.lastname@example.org.
To learn more about the Databases module, you can browse other articles here.
Please note that the Database or Record terminology referenced above may appear as another name in your platform as these are customizable. You can view related terminology here.