Lunatic
Lunatic copied to clipboard
Dynamic Unit on InputNumber
Modelisation
{
"id": "kze792d8",
"componentType": "InputNumber",
"mandatory": false,
"page": "2",
"min": 0,
"max": 10,
"decimals": 0,
"label": { "value": "\"➡ 1. \" || \"NB \"", "type": "VTL|MD" },
"conditionFilter": { "value": "true", "type": "VTL" },
"hierarchy": {
"sequence": {
"id": "ksyjs7vy",
"page": "1",
"label": { "value": "S0", "type": "VTL|MD" }
}
},
"bindingDependencies": ["NB"],
"response": { "name": "NB" },
"dynamicUnit": {
"type": "VTL|MD",
"value": "\"kilo \" || cast(2+2, string) || \" tonnes\""
}
}
Be awared to ensure retro-compatibility (we keep legacy unit
properties)
Behaviour
Replace unit by dynamic expression in VTL | MD
See https://github.com/InseeFr/Lunatic/pull/553
Link issue : https://github.com/InseeFr/Lunatic/issues/493