Hey,
I created some custom forms in which some calculation is done. My problem is, that this only works in the preview. When I save my settings and run the form, the field, where the result of the calculation should be displayed remains empty.
For example I wanna add two values of two number fields. The result should be displayed in a further field. All three field are in one panel. (Details below)
Do you habe an idea to solve this issue?
Laura
------------------------------
XNAT version: 1.8.8
And the .json code of the panel:
{
"title": "Addition",
"theme": "warning",
"collapsible": false,
"key": "addition",
"type": "panel",
"label": "Panel",
"input": false,
"tableView": false,
"components": [
{
"key": "number1",
"type": "xnatNumber",
"input": true,
"label": "Number 1",
"delimiter": false,
"tableView": false,
"requireDecimal": false,
"truncateMultipleSpaces": false
},
{
"key": "number2",
"type": "xnatNumber",
"input": true,
"label": "Number 2",
"delimiter": false,
"tableView": false,
"requireDecimal": false,
"truncateMultipleSpaces": false
},
{
"label": "Result (Textfield)",
"redrawOn": "data",
"calculateValue": {
"+": [
{
"var": "data.number1"
},
{
"var": "data.number2"
}
]
},
"key": "result",
"type": "textfield",
"input": true,
"prefix": "=",
"disabled": true,
"refreshOn": "change",
"tableView": true,
"keyModified": true
}
]
}