Hello, we would like to copy the value of the selected (checkbox checked) cell in a row to a single-line input question, as shown in the example. Please note that only one row should be selected at a time.
JSON{
"logoPosition": "right",
"pages": [
{
"name": "page1",
"elements": [
{
"type": "text",
"name": "a"
},
{
"type": "matrixdynamic",
"name": "b",
"columns": [
{
"name": "Column 1",
"cellType": "checkbox",
"colCount": 0,
"choices": [
"X"
]
},
{
"name": "Column 2",
"cellType": "text"
},
{
"name": "Column 3",
"cellType": "text",
"defaultValueExpression": "{rowindex}"
}
],
"rowCount": 3
}
]
}
]
}
Hello Saulius,
From what I gather, you wish to perform these tasks:
Note that for Dynamic Matrices, selecting a row at a time may require a lot of coding.
Regarding copying the value of a cell: you can do so using the new
setValueIf
/setValueExpression
settings. Alternatively, you can handle this from code using the survey.onMatrixCellValueChanging/survey.onMatrixCellValueChanged event.Would you elaborate on your task?