Hi,
I want your suggestion for the most optimal way to how I can update a question json, while on a seperate custom tab. For my business case, i have the following:
I want after entering the points, that the property point will be updated in each choice.
JavaScript// it should go from this
...
"elements": [
{
"type": "radiogroup",
"name": "question1",
"choices": [
"Item 1",
"Item 2",
"Item 3"
]
},
...
// to this
"elements": [
{
"type": "radiogroup",
"name": "question1",
"choices": [
{value: "Item 1" points: 3},
{value: "Item 2" points: 2},
{value: "Item 3" points: 5},
]
},
Note that i already have the property defined in the question and its choices.
I can use model.survey.getAllQuestions()
and the navigate to the question and then use the functionsetPropertyValue()
but its not a reactive optimal solution. I looked through the possible functions and couldn't find something that goes in the direction of for example question.overrideJson({})
.
What do you suggest for my case?