adding total to numeric variables
Jul 22, 2021
By
William Ryan
Hi All,
I have a quiz question where the correct answer will be the sum of three numeric entry fields - Sphere_Entry, Cyl_Entry and Axis_Entry. there is a fourth numeric entry field which is Total. The triggers look like this:
- Set Sphere_Entry equal to the typed value when Sphere_Entry loses focus
- Add variable Sphere_Entry to Total when Sphere_Entry loses focus
This is repeated for the other two numeric entry fields.
When I test the slide, the numeric entry field Total stays at "NaN"
I am sure I got this kind of interaction working in another project, but I don't remember how...
3 Replies
Change the second trigger to Add variable Sphere_Entry to Total when Sphere_Entry changes, and see if that helps.
It may be that the second trigger begins, and takes that value with it before the first trigger has finished changing to the new value.
Hi Walt, thanks for your second response to me today... :-)
It seems to be working now. Thanks again.
This post was removed by the author
Wow, I didn't even notice. I should pay closer attention.
Glad it worked. PIAWYC (Pass it along when you can).