Skip to main content
Participating Frequently
October 13, 2017
Answered

What is the maximum length you can set for a Captivate Variable?

  • October 13, 2017
  • 2 replies
  • 1326 views

What is the maximum length you can set for a Captivate Variable?

    This topic has been closed for replies.
    Correct answer TLCMediaDesign

    You can set them manually in the CPM.js to be real long. There are several CP variable that are 1000 characters long.

    If you search for cp.cv('yourVariableName'

    the last argument is the length. YOu can change it to a very large number.

    This shows the student name set to 1000

    cp.cv('cpQuizInfoStudentName', '', 0, 1000);

    2 replies

    TLCMediaDesign
    TLCMediaDesignCorrect answer
    Inspiring
    October 13, 2017

    You can set them manually in the CPM.js to be real long. There are several CP variable that are 1000 characters long.

    If you search for cp.cv('yourVariableName'

    the last argument is the length. YOu can change it to a very large number.

    This shows the student name set to 1000

    cp.cv('cpQuizInfoStudentName', '', 0, 1000);

    Participating Frequently
    May 5, 2021

    Just want to add that in Captivate 2019, there now seems to be an additional argument. I'm seeing:

    cp.cv('TOPIC_NAV','',0,50,0);
    So clearly 0 is not the length. I'd say it's now the second-to-last argument and has been reduced to 50 (!) for user-defined variable. Isn't there a way to adjust this withing Captivate instead of editing the cpm.js? I thought sure there was, but maybe I'm thinking of the display length...
     
    TLCMediaDesign
    Inspiring
    May 10, 2021

    The only way I know is to use the insert variable [X] in a text caption, select the variable and change the maximum length, then delete the text caption.

    Lilybiri
    Legend
    October 13, 2017

    Used to be 256, but recently it seemed to have decreased to about 150.

    Participating Frequently
    October 13, 2017

    Thanks Lilybiri.   This variable maximum length number always seems to be a secret.   Don't know why.   Also the way variable length is set or changed in Captivate is a little strange and not very obvious.   

    -Steve

    Lilybiri
    Legend
    October 13, 2017

    It not really the length of the variable you define, which is always the

    same, but the number of characters that will display when inserting the

    variable in a text container.