Variables: convert type? concatenate?

Jul 12, 2013

I've hunted for a while but I'm not seeing how to do this (easily). Before I submit this as a feature request, anybody know how I could pass a number variable to a text variable? It would also be nice to concatenate variables.


3 Replies
Antony Snow

Hi William,

I'm not sure I understand what you mean by passing a number variable to a text variable. Could you provide an example of what you are trying achieve?

You can concatenate variables by inserting a reference to each. For example, if you have a text variable called 'UserName' that is populated via a text entry box and a number variable called 'UserAge' that is populated via a numeric entry box, you can add a single line of text (on the same slide or any slide you wish) as follows:

%UserName% is %UserAge% years old

So if the user enters 'John Smith' and '30' in the applicable data entry boxes, the line of text will display "John Smith is 30 years old" 

Does this help?


William Nunes

Well, the main thing I'm trying to do is pass a few scores which are number variables to the LMS. I was trying to follow the tutorial on modifying the survey quiz type but that technique evidently only passes text vars. I figure there is actionscript lurking under the hood of Storyline--the functions to turn score=0 (Number) into score="0" (String) and vice versa are there if SL would only let us at it.

RE concatenation; it would be handy to be able to pass something like the dynamically assembled "John Smith is 30 years old"  into a single variable.


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