Skip to main content
Known Participant
November 12, 2015
Question

Can't get spaces to work in a concantenated string in an Advanced Action

  • November 12, 2015
  • 1 reply
  • 515 views

I'm just trying to take a text entry box variable and add some plain old text to it. I've succeeded in doing that but separating the text strings with spaces is stumping me. I tried putting spaces between quotes (e.g., "    ") and without quotes but neither seems to work. Just wondering if this is possible. I can't believe it isn't so maybe I'm missing a simple solution. Thanks.

    This topic has been closed for replies.

    1 reply

    Lilybiri
    Legend
    November 12, 2015

    Sighing...concatenation is an old feature request, wonder if it ever will work as expected. You can put the text string (space added) followed by a variable in a text container, but if you want to use an advanced action to concatenate you have problems. Captivate doesn't distinguish numbers and strings, the number 0 is the same as an empty string.

    JS is a workaround. Why do you exactly need to concatenate, can you explain the goal?

    Known Participant
    November 12, 2015

    Wow - thanks for that quick response. I just want to reproduce something like this: "Willis,Sam  11/10/2015 08:12:59 AM EST > Suggested the patient call for an appointment as soon as possible."

    The text following the > symbol is a text entry variable, the rest will be plain old text, I guess I could use a date system variable, but the time system variable doesn't seem to give me anything that looks like this. My problem is the spaces between the variable and/or text. I know this is pretty easily done in Javascript and I could probably handle it (although I'm not a programmer), but I still don't understand how to get a Javascript result back into Captivate. I've seen a few other instances where Javascript would help me solve some relatively simple issues - I just wish I could find more information about how Javascript can be made to work with Captivate.

    Lilybiri
    Legend
    November 12, 2015

    If you want to show this in a text caption, just add the spaces to the text itself?

    As for the date system variable, did you ever try cpInfoCurrentLocalDateString: it will look like the date you set up on your system. You'll have to combine it with a time system variable.

    As for JS: https://helpx.adobe.com/captivate/using/common-js-interface.html

    Jim Leichliter was the expert to go to, but he left

    Maybe TLCMediaDesign, (David) will pop in?