You're pulling in the piping for the recode... did you try just ```${q://QID30/ChoiceGroup/SelectedChoices}```?
>
@Kate said:
> You're pulling in the piping for the recode... did you try just ```${q://QID30/ChoiceGroup/SelectedChoices}```?
Thanks for your reply Kate.
It doesn't work. I did that and it doesnt set any default choice.
As I have it now, it sets a default choice based on the Recorde Value. But what I want is based on the Variable Naming
The "Variable Naming" of this question:
!
should match the variable name of this question:
!
Hello
@filipe ,
Below is the code for setting the default choice based on the answer given in the previous question
var val ="${q://QID30/ChoiceGroup/SelectedChoices}".split(", ");
for (var i = 0; i < val.length; i++) {
this.setChoiceValueByVariableName(val[i],true);
}