Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Inserting line breaks in a variable in Captivate 2017

Explorer ,
Oct 12, 2017 Oct 12, 2017

Hello!

I was wondering if there was a way to insert line breaks into a variable that is then posted in a text field?

I tried everything mentioned here for an older version of Captivate, to no avail: Discussion | eLearning | Page 2346895

What I want to do:

I have a complex activity that I want to give feedback on. It is a conversation simulation, where the user has multiple possible actions he can undertake. Every one of those actions can be successful, failed, and sometimes partially successful. I want the feedback slide to include the feedback per failed and partially successful actions, but not for the successful ones. In this way, the feedback is intelligently built line per line with only the pertinent information.

If I cannot create a variable that will basically concatenate all of those lines of feedback into a variable, I only see 2 solutions

1- Create every possible feedback for all sets of possibilities, and use the Change State action to give the feedback text field appropriate to the learner's set of actions. This would be bery tedious, and somewhat error-prone.

2- Give feedback for all actions, even the successful ones, with one separate variable for every line of feedback, so that I can have the feedback text field look like this:

     $$Var_Feedback_Line_1$$

     $$Var_Feedback_Line_2$$

     $$Var_Feedback_Line_3$$

     $$Var_Feedback_Line_4$$

     $$Var_Feedback_Line_5$$

I'm not sure what I should do from here. What are your suggestions?

TOPICS
Advanced
864
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Engaged , Oct 12, 2017 Oct 12, 2017

If you are publishing to HTML5, a simple <br> line break tag in your variable text should do the trick. Doesn't work for Flash output, of course.

Translate
Engaged ,
Oct 12, 2017 Oct 12, 2017

If you are publishing to HTML5, a simple <br> line break tag in your variable text should do the trick. Doesn't work for Flash output, of course.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 12, 2017 Oct 12, 2017

Thank you. I can't believe I spent a few hours looking for that. Trying \n and similar methods to no avail...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 12, 2017 Oct 12, 2017

Just one warning, maybe not relevant: the number of characters in a variable is limited. It used to be 256, but in later versions it looks more about 150. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 12, 2017 Oct 12, 2017

Oh, thanks!

It definitely is relevant. I'll be able to manage around this, but it could have given me a headache if you hadn't given me that warning.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 12, 2017 Oct 12, 2017

OK, I would have gone with the states work flow, because it allows you also styling of the texts which is not natively possible with values of variables. I don't understand why you find that more prone to errors? WIth a good naming discipline and shared actions, it could be even easier to manage.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 12, 2017 Oct 12, 2017
LATEST

Thank you!

I counted 32 different possible combinations of feedback, and I worry that, because of the number of states for the feedback field, it would be easy to make a mistake on a few of them and miss it.

But yeah, I did run into trouble trying to deal with the styling of texts, so I might go with the sates work flow as you suggest.

Thank you to both of you once again!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources