Element Types¶
Screen meta data files define the pop-up interface for custom risk actions. The structure is: groups → sections → elements. Each element is one form field.
Prerequisite
Screen meta data is always paired with a risk action — the operationName in the config file must match an operations[].name in the action JSON. If you haven't read Anatomy of a Risk Action yet, do so first to understand how the two connect.
The two-file pattern¶
Custom risk action screens use two files:
- Config file (
screen-meta-data/config/{bc}/{operation}.json) — links an operation name to a layout file and defines sub-statuses - Layout file (
screen-meta-data/files/{bc}/{operation}.json) — defines the groups/sections/elements structure
Config file fields¶
| Field | Description |
|---|---|
operationName |
Must match the operation name in the risk action config exactly |
notRequiredSubStatus |
Sub-status set when user marks the action as not required |
initialSubStatus |
Sub-status set when the action is initiated |
closingSubStatus |
Sub-status set when the action is completed |
dataFile |
Filename of the screen meta data layout file |
copiedToRiskTypes |
Whether completed screen data is copied to RENEWAL or MTA risk types |
apiGet |
Endpoint URL to fetch existing data for this action |
apiPost |
Endpoint URL to save data when the action is completed |
Warning
The operationName in the config file must match the operation code in the risk action file exactly. A mismatch means Workbench cannot find the pop-up definition, resulting in an empty or broken action.
All element types¶
These are the valid type values derived from the FormElementType enum in the platform source. Values not in this list will not render.
| Type value | UI control rendered |
|---|---|
address-lookup |
Address search with autocomplete |
autocomplete |
Single-select with search/typeahead |
autocomplete-multi-select |
Multi-select with search/typeahead |
broker-contact |
Broker contact search field |
checkbox |
Single checkbox (boolean) |
checkbox-group |
Group of checkboxes |
content-editable |
Rich inline editable content block |
currency-input |
Numeric input with currency symbol |
date |
Date picker (use this — not date-input or local-date) |
date-duration |
Duration input (e.g. period in months/days) |
date_range_field |
Start and end date range picker |
date-time |
Date and time picker combined |
file-upload |
File attachment upload |
hidden |
Hidden field — not shown to user, used for computed/default values |
iframe |
Embedded iframe frame |
link |
Clickable hyperlink |
multi-select |
Multi-value dropdown |
numeric-input |
Numeric value input |
party |
Party search/lookup (insured, broker, etc.) |
party-address-lookup |
Address lookup scoped to a party record |
party-contact |
Contact search scoped to a party record |
percent-input |
Percentage input (stored as decimal or raw percentage, depending on config) |
radio-group |
Group of radio buttons |
radio-selector |
Stylised radio selector (card-style) |
repeatable |
A section that can be repeated to capture multiple rows of data |
rich-text |
Rich text editor (bold, italic, lists) |
select |
Single-select dropdown |
text-area |
Multi-line text input |
text-input |
Single-line text field |
time |
Time-only picker |
toggle-switch |
Boolean toggle |
type-ahead-multi-select |
Multi-select with typeahead |
type-ahead-select |
Single-select with typeahead |
utc-time |
UTC time picker |
Correct date type
Use "type": "date" — not "date-input" or "local-date". Those strings do not appear in the platform source and will not render.
Option list sources¶
Select, autocomplete, and type-ahead elements load their options from a source specified via the optionList field:
| Source | Description |
|---|---|
BUSINESS_CONSTANT |
Loads from a business constants file. Specify the constant type in optionListParams.businessConstantType. |
API |
Loads from a client microservice REST endpoint. See API-Driven Options. |
ACTIVE_PRODUCTS |
Loads active products for the current LOB. |
UNDERWRITERS |
Loads all underwriter users. |
UNDERWRITING_ASSISTANTS |
Loads underwriting assistant users. |
YES_NO / NO_YES |
Simple yes/no dropdown. |
USER |
All Workbench users. |
Element field reference¶
The following fields are available on all elements:
| Field | Type | Description |
|---|---|---|
key |
string | Unique identifier for this field within the form. Used to reference the value in pipelines and expressions. Required. |
type |
string | The element type. Must be one of the values in the table above. Required. |
label |
string | Display label shown above the field. |
placeholder |
string | Placeholder text shown inside the field when empty. |
optional |
boolean | If true, the field is not required. Fields are required by default. |
hidden |
boolean | If true, the field is not rendered at all. |
hideExpression |
string | A JavaScript expression (evaluated against the form model) that hides the field when it returns true. See Display Expressions. |
clearOnHide |
boolean | If true, the field's value is cleared when it is hidden. Defaults to false. |
hint |
string | Help text shown below the field. |
modifierClass |
string | CSS modifier class. Use "non-editable" to render the field as read-only. |
validators |
array | Array of validator configurations. See Validators below. |
mandatory vs optional
Older config examples use "mandatory": true — the current platform uses "optional": false (or simply omits optional, since fields are required by default). Prefer omitting optional for required fields, or setting "optional": true for optional ones.
Repeatable element configuration¶
The repeatable type captures multiple rows of data. It supports additional config via a nested block:
{
"key": "coverages",
"type": "repeatable",
"label": "Coverages",
"repeatableConfig": {
"title": "Coverage",
"repeatButtonLabel": "Add Coverage",
"oneRow": false,
"headerLabels": true,
"appendIndexToLabel": false,
"flexibleLayout": false
},
"elements": [
{ "key": "coverageType", "type": "select", "label": "Type", "optionList": "BUSINESS_CONSTANT", "optionListParams": { "businessConstantType": "coverage_type" } },
{ "key": "amount", "type": "currency-input", "label": "Amount" }
]
}
repeatableConfig field |
Description |
|---|---|
title |
Label shown above each repeated row |
repeatButtonLabel / repeatButtonLabelKey |
Label on the "add row" button |
oneRow |
If true, limits to a single row — hides the add button after the first row |
headerLabels |
If true, shows column headers above the first row |
appendIndexToLabel |
If true, appends a row number to each label (e.g. "Coverage 1", "Coverage 2") |
flexibleLayout |
If true, allows rows to wrap/stack on smaller screens |
hideActions |
If true, hides the add/remove row buttons |
Validators¶
Validators are added to the validators array of any element:
{
"key": "premium",
"type": "numeric-input",
"label": "Premium",
"validators": [
{
"validator": "minValue",
"value": 0,
"message": "Premium cannot be negative"
}
]
}
Each entry has:
| Field | Description |
|---|---|
validator |
The validator name (see tables below) |
value |
Parameter passed to the validator (meaning depends on the validator) |
message |
Error message shown to the user when validation fails |
messageKey |
Localisation key for the message (use instead of message for multi-language implementations) |
Built-in validators¶
| Validator | What it checks |
|---|---|
required |
Field must have a value |
min |
Numeric value must be ≥ the given number |
max |
Numeric value must be ≤ the given number |
minLength |
String length must be ≥ the given number |
maxLength |
String length must be ≤ the given number |
pattern |
Value must match the given regex pattern |
email |
Value must be a valid email address |
Custom validators¶
| Validator | What it checks |
|---|---|
alphanumericOnly |
Value contains only letters and numbers |
atLeastOneValueChecked |
At least one checkbox in a group is checked |
exactLength |
Value has exactly the given character length |
forbiddenValuePresent |
Value is not in the provided forbidden list |
greaterThan |
Numeric value is strictly greater than the given number |
greaterThanControl |
Numeric value is greater than the value in another named field |
lowerThanControl |
Numeric value is less than the value in another named field |
matchRegex |
Value matches the given regex (use invert: true to invert) |
maxValue |
Numeric value is ≤ the given number (handles string-formatted numbers) |
maxValueExclusive |
Numeric value is strictly less than the given number |
minValue |
Numeric value is ≥ the given number |
minValueExclusive |
Numeric value is strictly greater than the given number |
noDuplicateValues |
Value is not already present in a provided list |
noEmptyStrings |
Value is not blank/whitespace-only |
nonNullable |
Value is not null |
numberInRange |
Numeric value falls within min/max bounds (inclusive/exclusive configurable) |
oneInGroupRequired |
Exactly one of the named fields in the group has a value |
oneInRepeatableRequired |
Each row in a repeatable must have at least one of the named fields |
oneRequired |
At least one of the named numeric fields has a value > 0 |
onlyOneAllowed |
At most one of the named numeric fields has a value > 0 |
percentagesTotal100 |
Sum of percentage values in a repeatable equals exactly 100 |
propertiesRequired |
All listed property keys in each row of a repeatable are populated |
radioValueRequired |
A radio/select has a selected option |
requiredForControlValue |
This field is required when another named field has a specific value |
requiredWithOthers |
This field is required when any of the listed sibling fields have values |
uniqueInRepeatable |
Value is unique across all rows in the same repeatable section |
valueIsInteger |
Numeric value is a whole number (no decimals) |
valuesEqualTotal |
Sum of a named column across all repeatable rows equals a target |
invalidCharacters |
Value does not contain any of the specified forbidden characters |
Date validators¶
Date validators are covered in detail on the Date Validators page. The available validators are dateAfter, dateAfterControl, dateAfterAndNotOnControl, dateBefore, dateBeforeControl, and dateBeforeWarning.
Basic element example¶
Select element example¶
{
"key": "currency",
"label": "Currency",
"type": "select",
"optionList": "BUSINESS_CONSTANT",
"optionListParams": {
"businessConstantType": "currency"
}
}
Hidden computed field example¶
Conditional field example¶
{
"key": "mtaReason",
"label": "MTA Reason",
"type": "select",
"optionList": "BUSINESS_CONSTANT",
"optionListParams": { "businessConstantType": "mta_reason" },
"hideExpression": "model.riskType !== 'MTA'",
"clearOnHide": true
}
See also¶
- API-Driven Options — for dynamic dropdowns loaded from a client endpoint
- Dynamic Computation — for auto-calculated totals from repeatable sections
- Date Validators — for date field validation constraints
- Display Expressions — for conditionally showing/hiding fields