# Self Checking Table

**URL:** <https://cl.desmos.com/t/self-checking-table/784>\
**Category:** Questions\
**Created:** [April 2, 2020, 3:22pm UTC](https://cl.desmos.com/t/self-checking-table/784 "2020-04-02T15:22:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elizabeth\_Houwen](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/elizabeth_houwen/32/565_2.png) [@Elizabeth\_Houwen](https://cl.desmos.com/u/Elizabeth_Houwen)\
**Post date:** [April 2, 2020, 3:22pm UTC](https://cl.desmos.com/t/self-checking-table/784/1 "2020-04-02T15:22:42Z")

</div>

I’m trying to create a self checking table, but can’t figure out the CL to have it recognize the third column in latex. It will only work if I change the column to format as text. Any advice would be greatly appreciated!

 ![Screen Shot 2020-04-02 at 11.21.27 AM](https://canada1.discourse-cdn.com/flex031/uploads/desmos/original/1X/c882f1685f6f6ff1a0b978b1061fc3b7b6b307d1.png)

 ![Screen Shot 2020-04-02 at 11.21.36 AM](https://canada1.discourse-cdn.com/flex031/uploads/desmos/original/1X/c28e38209da191b981a3481128fbda8cfaeba80e.png)

---

<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:** [April 2, 2020, 7:14pm UTC](https://cl.desmos.com/t/self-checking-table/784/2 "2020-04-02T19:14:40Z")

</div>

Instead of trying to match the exact text, you could use simpleFunction and evaluateAt(). I like using Booleans for checking answers.

checkf1= simpleFunction(final1.latex).evaluateAt(3)=0 and simpleFunction(final1.latex).evaluateAt(2)=1

Repeat choosing whatever you want to evaluate x at and the appropriate results. Then,

content:  
when not…  
when table4.submitted and value2=1 … =144 and checkf1 and checkf2… etc.

checkf1 outputs true or false depending on results, so you don’t need to use an equality or inequality for your conditional.

---

<div class="post-metadata">

**Author:** ![Lukas\_Hopper](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/lukas_hopper/32/655_2.png) [@Lukas\_Hopper](https://cl.desmos.com/u/Lukas_Hopper)\
**Post date:** [July 30, 2020, 7:44pm UTC](https://cl.desmos.com/t/self-checking-table/784/3 "2020-07-30T19:44:44Z")

</div>

I’m needing some help with a similar issue. But instead of checking a numerical value, I need it to check a text input (participants are suppose to answer with A, B, C, or D).

I figure there is some way to do simpleFunction, but i’m not sure how it works. Link to the activity is below

> **[Bey's Presentation • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/5f2301534fadd344f0bbd595)**
>
> by Lukas Hopper

---

<div class="post-metadata">

**Author:** ![SqrtOfPi](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/sqrtofpi/32/899_2.png) [@SqrtOfPi](https://cl.desmos.com/u/SqrtOfPi)\
**Post date:** [July 30, 2020, 8:03pm UTC](https://cl.desmos.com/t/self-checking-table/784/4 "2020-07-30T20:03:01Z")

</div>

I think you need to add the button… that might be a recent update? (I’ve been figuring things out and just realized that maybe that’s why I was struggling with a table “submit” before?)

I fiddled with it and this seems to work! I also added “or” statements to allow lower case. 🙂

> **[\[Copy of\] Bey's Presentation • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/5f2324f1e49e0244f13c566a)**
>
> by Debbie G

---

<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:** [July 31, 2020, 5:26pm UTC](https://cl.desmos.com/t/self-checking-table/784/5 "2020-07-31T17:26:38Z")

</div>

Text matching as @SqrtOfPi is probably the easiest way, but you could conceivably use simpleFunction which would have the benefit of working even if there were extra spaces. Something like this would be correct with either capital or lowercase ‘a’:

```auto
correctA = isDefined(simpleFunction(this.cellContent(1,1),"A","a").evaluateAt(1,1))

```

Obviously you’d need to change which cell and the letters.

---

<div class="post-metadata">

**Author:** ![gallager](https://avatars.discourse-cdn.com/v4/letter/g/54ee81/32.png) [@gallager](https://cl.desmos.com/u/gallager)\
**Post date:** [September 16, 2020, 10:00pm UTC](https://cl.desmos.com/t/self-checking-table/784/6 "2020-09-16T22:00:43Z")

</div>

Hi,

I understand that Desmos is recommending the use of simpleFunction and evaluateAt() in certain cases.

However I was just looking for a simple text comparison, similar to what Elizabeth was doing above. The code I wrote to do that is not working. _If_ the characters entered into the table by the user match exactly what I am checking for, as in:  
matches = (testTable.cellContent(4,3) = “foo”),  
should that work? Thanks!

---

<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:** [September 16, 2020, 10:38pm UTC](https://cl.desmos.com/t/self-checking-table/784/7 "2020-09-16T22:38:21Z")

</div>

Text comparisons work. Just realize that they need to be exact matches (latex causes lots of problems), so capitalization, unintended spaces, etc. can all yield incorrect evaluations.
