NaN issues, blank entry fields, broken variables. I'm so lost!

Jun 22, 2022

I have a behavior tracking program where users set their goals and log their behaviors. 4 behaviors are in one category and 2 behaviors are in another and users can see their progress in a lightbox after each time they submit their log.

The top 4 behaviors should add to the ReadinessSupportTotal variable each time a user submits their log but it keeps giving me a NaN. The bottom 2 behaviors that add to the ReadinessResponseTotal variable work just fine even though they should all work the same way. 

And the reducing stigma field is the only one without a zero. It happens even if I put a new input field there. 

Is my project haunted? The tracking goes on for 10 days so there are a lot of variables to deal with.  Please help!

5 Replies
Joseph Francis

This sounds somewhat like what I was running into several months back. What happens if you explicitly declare the values of the variables to 0 on a slide just prior to the interaction slides, and do not trust the Default Value in the Variables dialog to carry through?

Storyline Not Seeing a Numerical Variable as Numerical

Steve Gannon

See the revised file attached.

1. As Joseph suggested, I initiated RS_RSDay01 to 0 using a trigger on the Day 1 Tracking slide and that populated the corresponding numeric entry box with 0 (though I agree that shouldn't be necessary).

2. I believe the variable used in the second trigger on the Progress Meter slide was incorrect. It should be dividing by ReadinessSupportGoal, not ReadinessSupportTotal, correct?

3. For the two triggers that perform division on the Progress Meter slide, I added a condition to only perform the operation if the variable being divided by is greater than 0. The NaN ("not a number") display typically occurs when you divide by 0 (resulting in infinity).

Phoenix Rain Bird

I can't believe that worked!! I misunderstood Joseph's suggestion and populated the ReadinessSupportTotal with a 0 at the beginning. Somehow only initiating the RS_RSDay01 trigger on day 1 fixed it for all the other days as well!

 

Good catch on the progress meter math. It looked off but I was too focused on the support total issue to realize it. Thank you both!