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

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

Community Beginner ,
Nov 12, 2015 Nov 12, 2015

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.

443
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 ,
Nov 12, 2015 Nov 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?

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 Beginner ,
Nov 12, 2015 Nov 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.

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 ,
Nov 12, 2015 Nov 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?

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 Beginner ,
Nov 12, 2015 Nov 12, 2015

Thanks. The date variable worked fine, but the time system variable, not so much. I think I added the spaces to the text itself, but it didn't work, but I'll try it again. Didn't Jim offer  some videos on Javascript and Captivate? They don't seem to be available anymore . . . unfortunately. It's not critical, but I'd sure like to get this to at least kind of work - it would be a nice little touch. Anyway, thanks again for all your help.

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 ,
Nov 12, 2015 Nov 12, 2015

Yes, he had. I will hurry to watch them again, because he will take them out end of this year (I bought them), you cannot buy them anymore now. I

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 Beginner ,
Nov 12, 2015 Nov 12, 2015
LATEST

Not to beat a dead horse, but I played around with and I got this far: Willis,Sam[current date][current time in military format]>[text entered in text entry box].

I can live with the time format, but I still can't for the life of me get any spaces to appear. Tried creating a variable containing just spaces, tried including the spaces in my expression statements, tried concatenating a separate line in the advanced action with just spaces. Nothing worked and some solutions prevented the advanced action from working at all.

I guess I have to start trying to figure out how to get Javascript involved.

Aha - got an answer from Rob Ward's Advanced Actions book. You insert a non-breaking space in a text box using Symbols (the Ampersand) and then copy it into the Value field when you create your variable.

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