Combine two variables into one

Oct 10, 2022

I am having a problem with essay questions submitting the results into our LMS.

As a background, the course that I have created is for DSE and incorporates a series of questions that the user is to answer about their own use of DSE.  The questions are a series of Yes/No questions and offer a free text additional information.  In order to minimise the number of clicks the user has to make and to incorporate the questions as part of the learning I am getting the Yes/No questions and free text questions to write to variables and then using these variables to automatically complete the question slides and submit them.

The Yes/No questions are completing and submitting with no problem at all.  The essay questions will not submit automatically, this is something that I am aware of as a feature within articulate.  I have found that if you run a Java script that interacts with the free text content this allows the content to automatically submit, for example, I can look for all white spaces and replace them with a space.  My problem is that unless the Java script actually finds and replaces something the automatic submission will not work.

 

To get around this I was wondering if it is possible to combine two variables together in Storyline?  My though is to combine the users free text with a set variable of a a defined string of letters and numbers (that the user would not have typed themselves) I can then look for this specific entry and remove it using Java and allow the automatic submission to work.

Is anyone aware of a way of combining two variables into one?

Thanks

5 Replies
Robert Stryker

Hi Matthew,
Here is a very quickly developed story file that adds two text variables together. It uses JavaScript to join the two variable inputs (and therefore cannot be Previewed in SL but must at least be published to HTML for previewing/testing) and then outputs to a third SL variable which can be displayed and/or sent to the LMS via a submit interaction trigger.

I combine variables frequently in similar ways to send groupings of learner responses as one comma-delineated variable to the LMS rather than as individual responses. This really shrinks down the size of learning reports.

Hope this helps!
Bob