Problem to adjust numeric variable when a key is pressed on a Text Entry object

Is anyone having problems in adjusting a numeric variable when a user presses a key in a text entry object.  For example, I want to count how many characters a person has entered in an alpha data entry object. So i have created a Add 1.00 to variable when the user presses the key of A.  But all I am getting is a NaN error.  I have noticed if I change the trigger to a user press of a numeric key like 2, after I press it for a second time then it displays the number or characters I type.  It appears some sort of problem is happening in the latest version of Storyline 2. This does work in Storyline .  Any ideas or confirmation of the error would be most appreciated. 

7 Replies
Christie Pollick

Hi, Mark -- Thanks so much for reaching out here and sorry to hear of your difficulties! Would it be possible for you to share your file to help illustrate the behavior you are experiencing? If so, please use the grey ADD ATTACHMENT button in the bottom left of the reply box, and you will be able to browse and upload from there. 

Christie Pollick

Hi, Mark -- Many thanks for the opportunity to take a look at your file, and when testing your course via the SCORM Cloud, I see the behavior you have described. I reached out to a few colleagues for their insights as well, and it appears that the NaN error you are finding is what you would experience if a learner was trying to enter something for the charc_count variable that wasn’t a number. Here is a discussion that may shed a bit more light. And also, since the method you are using does not appear to count any characters aside from the ones triggers have been set up for, perhaps you might want to consider the options here for validating text entry boxes via JavaScript (although JS is unsupported), as well.  

Mark Hampton

Hi, Thank you. Yes I was able to customize the file and get the results I am looking for. Here is my test file for your reference if needed in a future case. And maybe there is some other things I need to improve. Again many thanks and have a great weekend.