The text shown beside a Key Date in the user interface looks like a label, but it is the Key Date’s title. Because the title is configurable, you can replace a static string such as Incident Date with a dynamic one such as Date Dave fell over, where Dave is pulled from a participant on the parent work item.
Overview
Key Dates are work items in their own right. Like every work type, a Key Date has a Title generator that controls how its title is built when it is created or saved. By default the title is a fixed string entered against the Key Date type, for example, Incident Date. You can replace that fixed string with the output of a Data Composer field, and you can build that field from any combination of static text and live data on the case.
The pattern is always the same:
- Build a calculated field on the work type whose data you want to include. The field returns the exact string you want as the title.
- Configure the Key Date’s Title generator to load Data Composer fields, then reference the calculated field in the Generation mask.
The worked example below builds the title Date Dave fell over, where Dave is the first name of the client on the parent work item.
Before you start
- You need access to Modeller > Work type modeller and permission to edit the relevant work types.
- Identify the parent work type that holds the data you want to reference. In the worked example, this is the matter or instruction type that carries the client role.
- Identify the Key Date work type whose title you want to change. In the worked example, this is the Incident Date Key Date.
- Decide whether end-users should be able to edit the generated title. A generated title is rebuilt every time the work item is saved, so any edit is overwritten on the next save. Leave editing off unless you have a specific reason to allow it.
Step 1: Create the calculated field
The calculated field returns the title string. Put it on the Key Date work type itself so the field is scoped to where it is used.
- Navigate to Modeller > Work type modeller and open the Key Date work type.
- Open the Data Composer for the work type.
- Select the Work Item node, then select the + button to add a new field.
- Enter the field details.
| Field | Value |
|---|---|
| Name | incident-date-title |
| Display name | Incident Date title |
| Description | Title for the Incident Date Key Date, including the client first name. |
| Context | Work Item |
- Enter the expression.
'Date ' + $parent.roles.client.ods.person.firstName + ‘ fell over’
The expression concatenates three parts: the literal text Date, the client’s first name from the parent work item, and the literal text fell over. Single quotes mark literal strings. The + operator joins the parts and must have a space on either side.$parentnavigates from the Key Date up to its parent work item, which is where the client role lives. - Select the green tick to validate the expression. If the syntax is correct, no error appears at the foot of the editor.
- Save the calculated field.
The field is now available in Data Composer for the Key Date work type and can be referenced by the Title generator.
Variations on the expression
Use the patterns below to adapt the expression to your scenario.
| Goal | Expression fragment |
|---|---|
| Use the client’s full name | $parent.roles.client.ods.person.firstName + ' ' + $parent.roles.client.ods.person.lastName |
| Append the due date in 28 September 2026 format | + ' (' + format(taskDueDate.date.utc.value, 'd MMMM yyyy') + ')' |
| Reference a different role | Replace client with the system name of the role, for example, claimant, defendant, or buyer. |
| Pick the first item where a role allows multiples | Append !1 after the role name, for example, $parent.roles.claimant!1.ods.person.firstName. |
| Force title case on a name typed in lower case | Wrap the name in toTitleCase(toLower(...)). |
Strings must use single quotes. Special characters in literal text need a backslash to escape them.
Step 2: Configure the Title generator
With the calculated field in place, point the Key Date’s Title generator at it.
- Navigate to Modeller > Work type modeller and open the same Key Date work type.
- Open the Title and Reference card.
- In the Title generator section, set Mode to Generator.
- Set Generator to Configurable generic title generator.
- Select the Load Data Composer field(s) check box. This loads the calculated fields from the Key Date’s Data Composer so they can be referenced in the mask.
- In the Generation mask, enter the token for the calculated field you created in Step 1.
{incident-date-title}
The mask supports static text, symbols, whitespace, and tokens loaded by the check boxes above. If you want extra fixed text around the dynamic value, add it directly in the mask. For example,Incident: {incident-date-title}produces Incident: Date Dave fell over. - Clear Allow user editing to stop end-users from typing over the generated title. The title regenerates on every save regardless of this setting, so leaving editing on means user edits are overwritten next time the work item is saved.
- Save the work type.
Step 3: Verify the new title
Test the configuration against a real or sandbox case.
- Open a work item that uses the key date work type. Confirm the client role is populated with a person whose first name you can recognise.
- Add or open the Incident Date Key Date on that work item.
- Save the Key Date.
- Confirm the Key Date title displays as expected, for example, Date Dave fell over.
- Change the client on the parent and save the Key Date again. Confirm the title updates to reflect the new first name.
If the title displays as the raw token string {incident-date-title} rather than the resolved value, return to the Title generator and confirm that Load Data Composer field(s) is selected and that the token name in the mask matches the calculated field’s name exactly.
If the title resolves but the first name is blank, the client role is not set on the parent work item, or the role’s system name differs from client in your configuration.
Tips
- Keep the calculated field’s name short and lowercase. Tokens in the Generation mask are typed by hand and are case sensitive.
- A title generated from live data changes whenever the underlying data changes. If you need the title frozen at a point in time, build the title in a workflow action and write it back to the Key Date’s title field.
- The same pattern works for any work type’s title, not only Key Dates. The mechanics of the Title generator are identical across the work type hierarchy.