Accessing the values selected in a matrix question in a later question | XM Community
Solved

Accessing the values selected in a matrix question in a later question

  • 22 June 2024
  • 4 replies
  • 29 views

Badge +2

I have a matrix question (QID288) - there are 5 rows (A,B,C,D,E) and 6 columns (1,2,3,4,5,-) - it is a radio button matrix so that each of the lettered rows can only have one column selected.

In a later question I was to access the selections that were made in the earlier matrix question.

As far as I can see I can’t used pipetext.  From that I can see which lettered row had a selection made… but not which selection was made… 

matrixTablex = "${q://QID288/ChoiceGroup/SelectedChoices}";

So that does not help… unless I am missing something.

 

The other option seems to be to us a jquery.

Something like

radioButton = jQuery(#QID288~1~1);

to access A1.  But I cannot work out what the attributes would be that I should be… one suggestion seems to be

radioButton.is(“:checked”); 

but I don’t get any results when I try that.

I assume that the solution must be really simple.

Maybe my javascript code is in the wring place… should it be in the addOnReady function?

icon

Best answer by TomG 23 June 2024, 20:28

View original

4 replies

Userlevel 7
Badge +27

You can pipe the selected recodes (1-6) for each lettered row (A-E) (e.g., ${q://QID288/SelectedAnswerRecode/1} for row A).

Badge +2

Thanks Tom!!!
That is totally awesome, exactly what I wanted, and much easier than I had feared.
I presume that somewhere there is a list of attributes/functions that can be appended to a ${q://QIDxx/...} pipe… I could not find it.  Again, I’m sure that it must be somewhere obvious.
Thanks again.

Badge +2

I tried to mark Tom’s as the best answer… but I think my screen updates as I clicked and I somehow marked my reply to the answer as the best answer, and can’t see how unmark it… so just in case anyone else is looking I’ll his reponse in again - it was so useful to me!.

“You can pipe the selected recodes (1-6) for each lettered row (A-E) (e.g., ${q://QID288/SelectedAnswerRecode/1} for row A).”

Userlevel 5
Badge +2

I tried to mark Tom’s as the best answer… but I think my screen updates as I clicked and I somehow marked my reply to the answer as the best answer, and can’t see how unmark it… so just in case anyone else is looking I’ll his reponse in again - it was so useful to me!.

“You can pipe the selected recodes (1-6) for each lettered row (A-E) (e.g., ${q://QID288/SelectedAnswerRecode/1} for row A).”

I went ahead and marked his reply as the best answer!

Leave a Reply