Best way to concatenate strings

Oct 23, 2015

Hi All

I am trying to give feedback to the user on questions. So I want to take their answers and display them so they know what they chose (as the layer covers their answers).

I have seen javascript mentioned but don't know where to put it

 

I want to have a statement that only includes their answers. Something like this

Users answers:

[answer 1] , [answer 2], [answer 3]

Output on layer

you chose [answer 2] and [answer 3]

I haven't tried using javascript before so was wondering if Storyline had anything in it that you can use or if JavaScript is the only answer how do I do it?

 

thanks

Clive

3 Replies
Jason Reed

Hi Clive,

First off, I don't know anything about javascript, but I may have an alternate solution.

Can I just check I understand your question... am I correct in saying that, depending on which answer/s the learner chooses, you want to give them specific feedback?

If it's just single multiple choice, Storyline lets you give feedback for each answer. However, when you get into multiple selections it gets a little trickier.

What I'm thinking is that you could assign a true/false variable to each answer that is selected. Then you'd need to create a different feedback layer for each of the combinations.

So, you'd need a feedback layer for [answer 1] & [answer 3]
A feedback layer for [answser 2] & [answer 3] etc.

Then you'll need triggers that show each specific layer. ie. Show Incorrect Layer if Variable 1 & 3 are true. This way you don't need to have any javascript.

Does this make sense? Let me know if you need more clarification.

Clive Glasgow

[UNCLASSIFIED]

Thanks Jason

That makes perfect sense and a lot easier than using JavaScript I think. So used to looking for a difficult solution that I completely overlooked a simply elegant one :)

Cheers
Clive

[UNCLASSIFIED]

"The information contained in this email message is intended only for the addressee and is not necessarily the official view or communication of the Ministry. It may be legally privileged. If you are not the intended recipient you must not use, disclose, copy or distribute this message or the information in it as this may be unlawful. If you have received this message in error, please email or telephone the sender immediately."

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