# Grabbing defined variable in Graph for grade calculation

**URL:** <https://cl.desmos.com/t/grabbing-defined-variable-in-graph-for-grade-calculation/2087>\
**Category:** Questions\
**Tags:** validation, correctness\
**Created:** [December 3, 2020, 11:43pm UTC](https://cl.desmos.com/t/grabbing-defined-variable-in-graph-for-grade-calculation/2087 "2020-12-03T23:43:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cheng\_Saechao](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/cheng_saechao/32/1687_2.png) [@Cheng\_Saechao](https://cl.desmos.com/u/Cheng_Saechao)\
**Post date:** [December 3, 2020, 11:43pm UTC](https://cl.desmos.com/t/grabbing-defined-variable-in-graph-for-grade-calculation/2087/1 "2020-12-03T23:43:29Z")

</div>

Hi, my first time posting. I have a graph which I’m able to provide feedback to students whether they’ve graphed their coordinates correctly. Is it possible or how do you “grab” that “Bcorrect=1” variable to use it in a separate component to calculate a grade? If possible can someone add a screen and CL? Thanks in advance and Happy Holidays.

[https://teacher.desmos.com/activitybuilder/custom/5fc939b65bc8cc3d109cc2d9](https://teacher.desmos.com/activitybuilder/custom/5fc939b65bc8cc3d109cc2d9)

---

<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 4, 2020, 6:58am UTC](https://cl.desmos.com/t/grabbing-defined-variable-in-graph-for-grade-calculation/2087/2 "2020-12-04T06:58:20Z")

</div>

You can access any CL variable by using:  
`componentName.script.variableName`

If the variable type does not match what you need you may need to use ${ } around it. Note that your component name must also be unique.

---

<div class="post-metadata">

**Author:** ![Cheng\_Saechao](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/cheng_saechao/32/1687_2.png) [@Cheng\_Saechao](https://cl.desmos.com/u/Cheng_Saechao)\
**Post date:** [December 10, 2020, 1:22am UTC](https://cl.desmos.com/t/grabbing-defined-variable-in-graph-for-grade-calculation/2087/3 "2020-12-10T01:22:04Z")

</div>

Thanks for that. I’m still having a bit of trouble. Here’s a similar question with the entire lesson. How can I take the “1” from the isCorrect in screen 24 to use on screen 26 to sum up as pointsEarned?

> **[Assignment 25: Vertex Form • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/5fcbaf01081add448369d772)**
>
> Calculating and graphing using AOS and Vertex and stair pattern.

---

<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 10, 2020, 4:15am UTC](https://cl.desmos.com/t/grabbing-defined-variable-in-graph-for-grade-calculation/2087/4 "2020-12-10T04:15:35Z")

</div>

`${table5.script.isCorrect1}` will grab it.

It’s exactly the same as you did with all the inputs, just a different component name. You could also create a check in the table CL as you did with the inputs to set a different point value, and reference that instead of `isCorrect1`.
