Reset Activity with Action Button

I have an activity where my students enter a principle amount then click a button to show their interest. All of that is working so far.
When the reset button comes up and is clicked I want the the amount to reset back to zero. I feel like it has to be a simple solution but I havent been able to crack the code yet

I’m not fully sure how you have built your reset button. Here’s an example that lets you change the ouput based of whether the button has been pushed an even number of times or an odd number of times. reset button • Activity Builder by Desmos

1 Like

Did you ever find a solution? I’m struggling with this, as well. I have students create random groups, but I want to reset the sample after 3 draws.

@Jay recently shared this on Twitter and I think it should help you.

Depending on your activity and what dependencies it has between components, you can do this with a “resetOnChange” call. This doesn’t exist in all things (notably, the textInput).

However, you can do:

resetOnChange: “${whateveryourbuttoniscalled.pressCount}”

It only looks for string values, but that’s why you pull the number “pressCount” and make it a string.

See it in action in this activity: https://teacher.desmos.com/activitybuilder/custom/602a94ec8cdb8f0ca753136a

1 Like

See most recent comment below!