Adding text string variables together

May 09, 2012

There was a recent discussion about adding numeric variables together into a single variable output. Does anyone have any ideas how to string the values of several input TextEntry boxes into one final variable?

28 Replies
CV Sankars

Hi Ashley,

I actually got through to Phil who was very kind to send me a SL2 Version.

Here's my attempt for today using an interpretation his javascript and advice.

I ended up executing javascript for every item which I thought was a bit too repetitive. Is there a way to run one command for a variable like "List",  loop through all the possibilities and concatenate those that are selected?

I was able to reset the scene by executing javascript for my variables like "TotalPurchases", "TotalItems" and "Bill" (following another thread from Phil).



Ashley Terwilliger-Pollard

Hey Candice, 

Glad to hear that Phil was able to help you out and you could update the file here. I'll defer to the community for additional assistance on the Javascript set up as it's not something that I'm well versed in to offer ideas nor is it something that our team offers support for. You're in good hands with the community though! In the meantime, here are the general best practices we have documented for Javascript. 

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