# Referencing a Student's Multiple Choice Response Later

**URL:** <https://cl.desmos.com/t/referencing-a-students-multiple-choice-response-later/2144>\
**Category:** Questions\
**Created:** [December 9, 2020, 3:41am UTC](https://cl.desmos.com/t/referencing-a-students-multiple-choice-response-later/2144 "2020-12-09T03:41:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JMatuch](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jmatuch/32/1724_2.png) [@JMatuch](https://cl.desmos.com/u/JMatuch)\
**Post date:** [December 9, 2020, 3:41am UTC](https://cl.desmos.com/t/referencing-a-students-multiple-choice-response-later/2144/1 "2020-12-09T03:41:06Z")

</div>

Hi! I am trying to reference a student’s answer to a two-choice multiple choice question. I do not know how to make the text that appears change based on their response and have it appear in the content of my note.

I successfully referenced their math input from the previous slide, but I also want to include their choice.

Here is what I have:  
constant = X.numericValue

content: “On the previous screen, you picked ((this is where I want their choice to go)) and entered ${constant} as the constant of proportionality.”

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![cwinske](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/cwinske/32/3106_2.png) [@cwinske](https://cl.desmos.com/u/cwinske)\
**Post date:** [December 9, 2020, 12:09pm UTC](https://cl.desmos.com/t/referencing-a-students-multiple-choice-response-later/2144/2 "2020-12-09T12:09:42Z")

</div>

In the same note component, you can add this code, where choice is the name of the multiple choice component and three options are available:

```auto
selection = when choice.isSelected(1) "Option 1"
when choice.isSelected(2) "Option 2"
when choice.isSelected(3) "Option 3"
otherwise ""

```

Then you can put that variable in your content just like you did with ${constant}.

---

<div class="post-metadata">

**Author:** ![JMatuch](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jmatuch/32/1724_2.png) [@JMatuch](https://cl.desmos.com/u/JMatuch)\
**Post date:** [December 9, 2020, 2:59pm UTC](https://cl.desmos.com/t/referencing-a-students-multiple-choice-response-later/2144/3 "2020-12-09T14:59:12Z")

</div>

Got it!

M = X.numericValue

N = when C.isSelected(1) “Table A”  
when C.isSelected(2) “Table B”  
otherwise “”

content: “On the previous screen, you picked ${N} and entered ${M} as the constant of proportionality. On the graph, Table A is the red points, and Table B is the green points. Which graph looks like a proportional relationship?”

Thanks!

---

<div class="post-metadata">

**Author:** ![Sarah\_Lanahan](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/sarah_lanahan/32/871_2.png) [@Sarah\_Lanahan](https://cl.desmos.com/u/Sarah_Lanahan)\
**Post date:** [December 9, 2020, 7:40pm UTC](https://cl.desmos.com/t/referencing-a-students-multiple-choice-response-later/2144/5 "2020-12-09T19:40:44Z")

</div>

I’m working on something similar but with checkboxes. I wanted to create a final screen with all the students answers in one location. I have multiple screens with checkboxes.

Here is a [shortened version](https://teacher.desmos.com/activitybuilder/custom/5fd1270449acd13c0a7af821) of what I’m working on.

TIA

---

<div class="post-metadata">

**Author:** ![cwinske](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/cwinske/32/3106_2.png) [@cwinske](https://cl.desmos.com/u/cwinske)\
**Post date:** [December 10, 2020, 11:18am UTC](https://cl.desmos.com/t/referencing-a-students-multiple-choice-response-later/2144/6 "2020-12-10T11:18:01Z")

</div>

Doing something like this with the multi-select option is not fun. You will need to code a lot of combinations to catch all the options. This is a similar example that checks for correctness, but your intention will be much more code (63 options I think - I’m a bit rusty with probability calculations). Is there a way you can narrow down the choice options?

> [@Checkboxes with Student feedback](https://cl.desmos.com/t/checkboxes-with-student-feedback/1887/2):
>
> Make a variable to check for correct answers and that incorrect are unselected. In the checkbox CL: check= this.isSelected(1) and this.isSelected(3) and this.isSelected(5) and not( this.isSelected(2) or this.isSelected(4) ) You can then use checkboxName.script.check as a condition for note content: content: when checkboxName.script.check "Correct" otherwise "Incorrect" Many people want to wait for submission: content: when checkboxName.submitted #or button.pressCount\>0…
