-
Notifications
You must be signed in to change notification settings - Fork 268
Open
Labels
Description
Description
Currently, a record type is supported only as a single input field.
Example:
public type Person record {
string first_name;
string last_name;
int age;
};
In MI, this gets generated as a single attribute expecting the user to manually provide JSON input:
{
"type": "attribute",
"value": {
"name": "person",
"displayName": "person",
"inputType": "stringOrExpression",
"defaultValue": "",
"required": "true",
"helpTip": "",
"validateType": "",
"matchPattern": ""
}
}
This breaks the low-code experience because the user must manually construct a JSON payload for the record structure (e.g., { "first_name": "...", "last_name": "...", "age": ... }).
Instead, the user should be able to fill in record fields individually without writing JSON.
Record types should expose each field as a separate input attribute, while still supporting JSON as an optional combined input.
Example of expected generated attributes:
[
{
"type": "attribute",
"value": {
"name": "personInputType",
"displayName": "Person Input Type",
"inputType": "combo",
"defaultValue": "SINGLE",
"comboValues": ["JSON", "SINGLE"],
"required": "true",
"helpTip": "",
"validateType": "",
"matchPattern": ""
}
},
{
"type": "attribute",
"value": {
"name": "person",
"displayName": "person (JSON)",
"inputType": "stringOrExpression",
"defaultValue": "",
"required": "true",
"helpTip": "",
"validateType": "",
"matchPattern": "",
"enableCondition":{"personInputType":"JSON"}
}
},
{
"type": "attribute",
"value": {
"name": "first_name",
"displayName": "First Name",
"inputType": "stringOrExpression",
"defaultValue": "",
"required": "true",
"helpTip": "",
"validateType": "",
"matchPattern": ""
"enableCondition":{"personInputType":"JSON"}
}
},
{
"type": "attribute",
"value": {
"name": "last_name",
"displayName": "Last Name",
"inputType": "stringOrExpression",
"defaultValue": "",
"required": "true",
"helpTip": "",
"validateType": "",
"matchPattern": ""
"enableCondition":{"personInputType":"JSON"}
}
},
{
"type": "attribute",
"value": {
"name": "age",
"displayName": "Age",
"inputType": "stringOrExpression",
"defaultValue": "",
"required": "true",
"helpTip": "",
"validateType": "",
"matchPattern": ""
"enableCondition":{"personInputType":"JSON"}
}
}
]
Version
No response