Are you using the same question in survey flow for each branch.
if yes it will set the previous selected value if question is presented again.
> @bansalpeeyush29 said:
> Are you using the same question in survey flow for each branch.
> if yes it will set the previous selected value if question is presented again.
Yes I am. That's why I'm asking, if there is a way to reset it.
No actually, You have to make multiple questions as many time you are running for.
Even if you clear data for one iteration than your data will also be lost,
I only need calculated data which I save as unique emebeded data after each round - value_1, value_2 and so on.
Yeah you can set values to false like below:-
`Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
{this.setChoiceValue(1,false) ; }
{this.setChoiceValue(2,false) ; }
var questionDiv = this.getQuestionContainer();
});`
since you have matrix question you can use like, arr1 (number of rows), arr2(no of columns)
`Qualtrics.SurveyEngine.addOnload(function()
{
var arr1=[1,2,3]; //rows
var arr2=[1,2,3]; //Columns
for(var i=0;i<arr1.length;i++)
{
var x = arr1[i];
var y = arr2[i];
this.setChoiceValueByRecodeValue(x,y,false ); //to punch the answer in next matrix
}
});`
Hi, thank you very much. It seems to be on a good way - I have 6 rows and 2 columns, so:
var arr1=[1,2,3,4,5,6]; //rows
var arr2=[1,2]; //Columns
but it only resets the answer for the first 2 rows, not for others. As I'm total newbie, I can't help myself... thanks again.
Don't use arr2 instead use like
`Qualtrics.SurveyEngine.addOnload(function()
{
var arr1=[1,2,3,4,5,6]; //rows
for(var i=0;i<arr1.length;i++)
{
var x = arr1[i];
var y = 1;
var m=2;
this.setChoiceValueByRecodeValue(x,y,false ); //to punch the answer in next matrix
this.setChoiceValueByRecodeValue(x,m,false ); //to punch the answer in next matrix
}
});`
Thank you very much!