Help with displaying commas

Aug 21, 2019

Hi, 

I'm somewhat new to storyline, and trying to figure out how to show numbers with commas. I've read the thread on using javascript to execute a trigger, and I've done that, but I think the trigger is wrong or pointing to the wrong variable, because my numbers still don't display properly. I've added the slide here in case anyone can look at it easily and tell me what's missing. 

Thanks in advance!

2 Replies
David Schwartz

Hi Francie,

A couple of things here. First, your Javascript triggers should key off of changes to the specific variables rather than the generated variable NumericEntry. 

Bigger thing is that the numeric variables can't store the values with the commas, so you have to have text variables to display them. That means that you can't show the commas in the numeric entry fields at all.

I'm attaching a slightly revised version of your story with the first two triggers revised to key off changes to the first two cities, and putting the results into new text variables that are displayed in hidden text fields that are triggered to appear when control loses focus from the entry fields. I set up triggers that hide them when clicked on, so that the entry fields can be re-entered. This is not ideal, but it might be a way to go.

This discussion is closed. You can start a new discussion or contact Articulate Support.