Input Form Capabilities
By following the format described here, you can create an input form in a virtual workflow
for a formulation designer. You can do the following with this schema:
- Group fields into labelled sections for clear visual hierarchy.
- Set field constraints (min, max, step, maxLength) for built-in validation.
- Define ranges (min / target / max) on numeric fields to show acceptable limits.
- Mark fields as required.
- Apply number formatting such as integers, decimals, and percentages.
- Populate menus with a curated item lists.
- Configure a table for varying ingredients or process parameters.
Top-Level Structure
JSON objects must contain at least one of the following top-level keys:
| Key |
Required |
Description |
| groups |
Conditional |
Map of named groups, each containing one or more input field
definitions. |
| compositionToVary |
Conditional |
Tabular layout for varying ingredients or process parameters. |
Group
A group is a named container for related input fields. Each group has a label (the
section heading that displays in Formulation Design) and one or more field definitions keyed by a unique name.
{
"groups": {
"My Group Name": {
"label": "Displayed Section Heading",
"fieldKey": { /* field definition */ }
}
}
}
Field Definitions
Each property inside a group is a JSON object. Objects help define the virtual workflows
parameter fields. Common properties are:
| Property |
Type |
Required |
Description |
| inputControl |
string |
Yes |
The parameter field to render. |
| label |
string |
No |
Display label shown above the field. If the label is not provided then the
key is used as the label. |
| enabled |
boolean |
No |
true = interactive false = read-only
|
| required |
boolean |
No |
If true, the user must supply a value before submitting. This cannot be used
alongside the range property. |
| value |
varies |
No |
A pre-filled value that must match the type expected by the inputControl
property. |
| format |
string |
No |
A visual number format: integer, decimal, or percent. This only applies to
numeric controls. |
| constraints |
object |
No |
The validation limits. This is required (with min, max, step) for the slider
property. |
| range |
object |
No |
A range for Min / target / max limits. This can only be used for the
NumberField or Slider properties, and cannot be combined with the value or
required properties. |
| items |
array |
No |
Option list for control menus. Each item needs value and label. |
| multiSelect |
boolean |
No |
If true, allows selecting multiple options from the menu. Default is
false. |
Input Controls
The input control property determines what displays in the virtual workflow input
parameters and what value type is expected for each parameter.
Constraints
The constraints property applies validation or step behavior to a field. All keys are
optional unless the field is a slider (where min, max, and step are required).
| Key |
For |
Description |
| min |
NumberField, Slider |
Minimum allowed value. |
| max |
NumberField, Slider |
Maximum allowed value. |
| step |
Slider |
The increment between selectable values. |
| maxLength |
TextField, TextArea |
Maximum character count. |
Range
The range property lets you define an operating window with min, target, and max bounds.
Use this alongside the slider or NumberField controls to
set acceptable working ranges to the formulation designer.
range cannot be combined with value or
required on the same field.
Range Property Example
"range": {
"min": { "value": 3.8, "required": true },
"target": {"value": 4.2},
"max": { "value": 4.6, "required": true}
}
Drop-down
Drop-downs are menus configured with an items list. The value must always be an array of
strings, even for a single single-select drop-down.
Single-Select Drop-down Example
"CultureType": {
"label": "Starter Culture",
"inputControl": "Dropdown",
"enabled": true,
"required": true,
"value": ["thermophilic"],
"items": [
{"value": "thermophilic", "label": "Thermophilic (mild, creamy)"},
{"value": "mesophilic","label": "Mesophilic (tangy, firm)"},
{"value": "probiotic", "label": "Probiotic blend"}
]
}
Multi-Select Drop-down Example
"CultureType": {
"label": "Starter Culture",
"inputControl": "Dropdown",
"enabled": true,
"required": true,
"multiSelect": true,
"value": ["thermophilic", “probiotic”],
"items": [
{"value": "thermophilic", "label": "Thermophilic (mild, creamy)"},
{"value": "mesophilic","label": "Mesophilic (tangy, firm)"},
{"value": "probiotic", "label": "Probiotic blend"}
]
}
Composition to Vary Table
The vary table allows formulation designers to select ingredients to vary by specified
increments. The virtual workflow then generates suggested formulas with the selected
ingredients varied based on the specified increments.
| Key |
Required |
Description |
| columnLayout |
Yes |
The object defining headings and property mappings. |
| heading |
Yes |
An array of column display names. |
| ingredientProperty |
One of these |
Maps columns to ingredient attributes. Empty string = read-only cell. The
allowed attributes are limited to the ones shown as columns in the formula table
in Formulation Design. |
| processParameterProperty |
One of these |
Maps columns to process-parameter attributes. Same logic as above. |
- The compositionToVary table uses the heading array as the
master template. Everything else follows its lead based on a strict 1-1 index
mapping between the heading and property arrays.
- The UI engine maps columns by their position (index) in the arrays.
- The number of items in the heading array determines how
many columns display.
- Attribute Match: If an item in ingredientProperty or processParameterProperty array
matches an attribute defined in the OpenAPI spec, that value is filled from the formula
and displays.
- Attribute Mismatch: If a property name does not match a known attribute, the cell
remains empty, allowing for user input.
- If there is an empty string
"" in a property array, that cell becomes
read-only with no value.
- Any attributes in the property arrays that exceed the length of the heading array are
ignored.
- If a property array is shorter than the heading array, the missing columns are treated
as read-only.
Example JSON for Yogurt Optimization
The following JSON defines a single parameter group called "Yogurt Quality Parameters" with
four slider fields covering the key optimization dimensions: Acidity, Mouthfeel, Stability,
and Cost. Each slider has a full constraints block (min, max, step) and a range block (min,
target, max).
| Field |
What it models |
| Acidity |
pH of the finished yogurt. Slider track spans 3.5 - 5.0 pH; the quality window
is 3.8 - 4.6 with a target of 4.2. |
| Mouthfeel |
Sensory score on a 1 - 10 scale. Integer steps. Target score of 7. |
| Stability |
Structural stability as a percentage. Track spans 0 - 100%; the window is
70–98% with a target of 88%. |
| Cost |
Cost per unit in USD. Track spans $0.10 – $2.00 in $0.05 increments; the target
is $0.85. |
{
"groups": {
"Yogurt Quality Parameters": {
"label": "Yogurt Quality Parameters",
"Acidity": {
"label": "Acidity (pH)",
"inputControl": "Slider",
"enabled": true,
"format": "decimal",
"range": {
"min":{"value": 3.8 },
"target":{"value": 4.2},
"max": {"value": 4.6 }
},
"constraints": {
"min": 3.5,
"max": 5.0,
"step": 0.1
}
},
"Mouthfeel": {
"label": "Mouthfeel Score",
"inputControl": "Slider",
"enabled": true,
"format": "integer",
"range": {
"min": {"value": 1 },
"target": {"value": 7},
"max":{"value": 10 }
},
"constraints": {
"min": 1,
"max": 10,
"step": 1
}
},
"Stability": {
"label": "Stability (%)",
"inputControl": "Slider",
"enabled": true,
"format": "percent",
"range": {
"min": {"value": 70 },
"target": {"value": 88},
"max": { "value": 98 }
},
"constraints": {
"min": 0,
"max": 100,
"step": 1
}
},
"Cost": {
"label": "Cost per Unit ($)",
"inputControl": "Slider",
"enabled": true,
"format": "decimal",
"range": {
"min": {"value": 0.50 },
"target": {"value": 0.85},
"max": { "value": 1.20 }
},
"constraints": {
"min": 0.10,
"max": 2.00,
"step": 0.05
}
}
}
}
}
|