# Question on initialCellContent

**URL:** <https://cl.desmos.com/t/question-on-initialcellcontent/2262>\
**Category:** Questions\
**Tags:** validation, correctness\
**Created:** [December 27, 2020, 11:12am UTC](https://cl.desmos.com/t/question-on-initialcellcontent/2262 "2020-12-27T11:12:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richard\_Punches](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/richard_punches/32/882_2.png) [@Richard\_Punches](https://cl.desmos.com/u/Richard_Punches)\
**Post date:** [December 27, 2020, 11:12am UTC](https://cl.desmos.com/t/question-on-initialcellcontent/2262/1 "2020-12-27T11:12:18Z")

</div>

I am defining an initialCellContent based on the result of a multiple choice answer. Once selected, that value is stuck in the cell. If students realize they don’t like their multiple choice, the cell doesn’t change if the students change their choice. It literally took the initial value and won’t let that value change. Is there a better way to initially define cell content that will allow students to change their minds?

My CL:

cellDisableEvaluation(1,1):true

initialCellContent(1,1): when mc89b.isSelected(1) “\left(\right)\div\left(\frac{ }{ }\right)”  
when mc89b.isSelected(3) “\left(\right)\cdot \left(\frac{ }{ }\right)”  
otherwise “”  
initialCellContent(2,1): “\y=”

a3=parseEquation(this.cellContent(2,1)).differenceFunction(“y”).evaluateAt(38)

correct: a3=30

cellSuffix(2,1): when this.cellContent(2,1)=“\y=” “” when a3=30 “inches ✅” otherwise “❌”

---

<div class="post-metadata">

**Author:** ![Susan\_Lauer](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/susan_lauer/32/1832_2.png) [@Susan\_Lauer](https://cl.desmos.com/u/Susan_Lauer)\
**Post date:** [December 27, 2020, 4:38pm UTC](https://cl.desmos.com/t/question-on-initialcellcontent/2262/2 "2020-12-27T16:38:14Z")

</div>

I think you need this for your initialCellContent instead:

initialCellContent(1,1): “”  
cellContent(1,1): when mc89b.isSelected(1) “\left(\right)\div\left(\frac{ }{ }\right)”  
when mc89b.isSelected(3) “\left(\right)\cdot \left(\frac{ }{ }\right)”  
otherwise “”

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [December 27, 2020, 9:48pm UTC](https://cl.desmos.com/t/question-on-initialcellcontent/2262/3 "2020-12-27T21:48:43Z")

</div>

You can create a variable for your conditional text. Then, use that for your initialCellContent:

```auto
text=when mc89b.isSelected(1) "\left(\right)\div\left(\frac{ }{ }\right)"
   when mc89b.isSelected(3) "\left(\right)\cdot \left(\frac{ }{ }\right)"
   otherwise ""
   
initialCellContent(1,1): text

```

---

<div class="post-metadata">

**Author:** ![Richard\_Punches](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/richard_punches/32/882_2.png) [@Richard\_Punches](https://cl.desmos.com/u/Richard_Punches)\
**Post date:** [December 27, 2020, 11:46pm UTC](https://cl.desmos.com/t/question-on-initialcellcontent/2262/4 "2020-12-27T23:46:54Z")

</div>

Thanks Daniel,

I’ll try that.

-Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Punches](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/richard_punches/32/882_2.png) [@Richard\_Punches](https://cl.desmos.com/u/Richard_Punches)\
**Post date:** [December 27, 2020, 11:47pm UTC](https://cl.desmos.com/t/question-on-initialcellcontent/2262/5 "2020-12-27T23:47:18Z")

</div>

Thanks Susan,

I’ll check it out ASAP.

-Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Punches](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/richard_punches/32/882_2.png) [@Richard\_Punches](https://cl.desmos.com/u/Richard_Punches)\
**Post date:** [December 28, 2020, 12:01am UTC](https://cl.desmos.com/t/question-on-initialcellcontent/2262/6 "2020-12-28T00:01:58Z")

</div>

Well, no luck. I am still getting the same issue. Once I select a multiple choice answer, the initialCellContent enters that value but after about 2 to 3 seconds it locks it in. My goal is to allow students to choose hopefully choice 1 or 3 to solve a scale factor problem between two similar figures. Susan, if I use cellContent, then students cannot fill in the blanks in that cell. And initialCellContent only takes the initial value or whatever is clicked within the first few seconds of the initial choice. Once chosen, the CL makes either of the linked photos.

 ![alexcould1](https://canada1.discourse-cdn.com/flex031/uploads/desmos/original/2X/3/35310aa75e722523971404a74ece4346e6051160.png) ![alexcould2](https://canada1.discourse-cdn.com/flex031/uploads/desmos/original/2X/3/32d492869b616b171fb462b98c414c31141f4b83.png)

Thanks again for the help.

---

<div class="post-metadata">

**Author:** ![Susan\_Lauer](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/susan_lauer/32/1832_2.png) [@Susan\_Lauer](https://cl.desmos.com/u/Susan_Lauer)\
**Post date:** [December 28, 2020, 10:34pm UTC](https://cl.desmos.com/t/question-on-initialcellcontent/2262/7 "2020-12-28T22:34:00Z")

</div>

There is not a way to deSelect a choice, but I really like the idea of giving an initial formula. Since the cellContent does deSelect, I might add a third column (and header row, maybe) with this:

cellContent(1,3): when mc89b.isSelected(1) “\left(\right)\div\left(\frac{ }{ }\right)”  
when mc89b.isSelected(3) “\left(\right)\cdot \left(\frac{ }{ }\right)”  
otherwise “”  
cellDisableEvaluation(1,2):true  
cellContent(0,3):“Copy & Paste” # somewhere maybe with an arrow symbol  
cellContent(0,1):""  
cellContent(0,2):""  
cellContent(2,3): “”

Maybe Desmos will make a deSelect option something like multiChoiceDeselectable: true.
