Skip to main content
Participating Frequently
November 8, 2015
Question

How do you use a variable inside a scrolling text widget?

  • November 8, 2015
  • 1 reply
  • 1546 views

(Captivate 9) Example: I have two pages on page 1 the user answers a question in a text box entry (the answer can be multiple lines long) - this saves to a variable (Answer1) Which want to display on page 2. I can display it using a variable in a text caption box ($$Answer1$$) but if the answer is longer than the box it does not display the entire answer, so I wanted to display it in a scrolling text widget but I can not figure out how to do this.

I have tried using the variable $$Answer1$$ as the default text - this does not work.

I have tried assigning the variable Answer1 to the variable associated with the widget (Q1Answer) as an on Entry action for page 2 - this does not work.

I have tried making the variable associated with the widget the same as the text entry box - Answer1. This does not work.

Any suggestions?

    This topic has been closed for replies.

    1 reply

    Lilybiri
    Legend
    November 9, 2015

    When you inserted the variable in a text container (caption or shape), did you use the X button in the Properties panel? Do not type in the variable between $$ but use that work flow. In the dialog box you will be able to define the length displayed for the variable. This will be the same for the Scrolling Text Interaction, no need to switch to that because it has the same limit for displaying a variable (used to be 256 characters, but heard it is now less in CP9, didn't double-check).

    Moreover, only if you are publishing to SWF will it be possible to show the content in a learning interaction by defining the variable. This is functional for some learning interactions, not for all and it is NOT working for HTML output. That is another reason to use a text container instead of that interaction.

    Some examples of using the Scrolling Text Interaction: Custom Short Answer Question - Captivate blog

    Participating Frequently
    November 9, 2015

    I tried using the text caption and the "X" for the variable but the text caption is not big enough to hold my answer from my text entry box and therefore does not show all of the text on page 2 it will not show scroll bars no matter how many characters I select or input into the Maximum length field. This is also the case for a shape. This is why I was trying to use the scrolling text widget or another text entry box with scroll bars and show the text in its entirety but neither of these accept variables.

    I looked at the widgets but they list for captive 6.x so I am unsure if they will work in captive 9. If they can where do I install them in captivate?

    Any other suggestions?

    Participating Frequently
    November 18, 2015

    Which event did you use to assign the value populated in the TEB to the Scrolling Text interaction? You have to do it with an (advanced/shared) action after the TEB has been filled. You need to have the latest version of the interaction, because former versions didn't work, and still do not work for HTML.

    I used controlling the content of the interaction by advanced actions in: Custom Short Answer Question - Captivate blog


    As stated above I have tried populating the Scrolling Text Interaction two different ways and neither of them has worked.

    1) In the Text field of the scrolling text box I typed in $$Answer1$$ - This did not work

    2) I assigned the TEB variable to the Scrolling Text Interaction variable using the following steps.

    a) Gave the Scrolling Text Interaction a variable "var_displayText"

    b) Added this variable to the global variables and assigned it a value of "" (blank or nothing)

    c1) On Exit action of page 1 (the page that contains the TEB) I created an advanced action that i) assigns the variable "var_displayText" with "Answer1" ii) continue. Then called for this as my Exit Action. - this did not work.

    c2) just to make sure that I was not mis-assigning the variables I reversed it by assigning "Answer1" with "var_displayText" on exit (but this made "Answer1" blank. - so again this did not work.

    c3) So I tried doing it on Entry of page 2 (the page containing the Scrolling Text Interaction) using both variations above for assignment and again neither worked.

    c4) I also tried assigning it twice once when exiting page 1 and then entering page 2 - this did not work either.

    I am only publishing out the swf file so I know that I am only viewing it in that format so as per earlier discussion this is the only way it works.

    Does anyone have another suggestion on how to populate a Scrolling Text Interaction with information/text from a variable?