Skip to main content
AskingAboutJS
Inspiring
January 7, 2017
Answered

Variable Size?

  • January 7, 2017
  • 2 replies
  • 643 views

I would like to know how many characters variable may have.

I will be appending ONE variable every time a button is clicked.

What is the max characters it can hold?

Also, what is the max characters I can send to a google sheet cell from that ONE variable using AJAX?

Thank you in advance.

    This topic has been closed for replies.
    Correct answer TLCMediaDesign

    In JavaScript there really isn't a max length that you would ever achieve. over 9 Billion.

    The limit using the AJAX GET is 2,048 characters.

    May I ask why you would just keep appending onto the end of a variable string?

    2 replies

    Lilybiri
    Legend
    January 8, 2017

    If you want to use the variable within Captivate, there is a limit to what you can display (has nothing to do with creation window). It is about 218 characters, even though you can specify more in the Insert Variable dialog box. Even though I defined here the length as being 350, only 218 characters were displayed. This was a variable associated with a Scrolling Text interaction which had a lot more text.

    The value of a variable can have a greater length, there is no way to define a limit when creating the variable.

    AskingAboutJS
    Inspiring
    January 9, 2017

    Thank you.

    TLCMediaDesign
    TLCMediaDesignCorrect answer
    Inspiring
    January 9, 2017

    In JavaScript there really isn't a max length that you would ever achieve. over 9 Billion.

    The limit using the AJAX GET is 2,048 characters.

    May I ask why you would just keep appending onto the end of a variable string?

    Paul Wilson CTDP
    Community Expert
    Community Expert
    January 8, 2017

    In the variable creation window, you can set an initial value of a user variable to contain 150 characters. I conducted a test at runtime and was able to get a variable to contain 10,000 characters. It's probably capable of more than this but that's what I tested. Sorry, I can't help with the Google sheet using Ajax.

    Paul Wilson, CTDP
    AskingAboutJS
    Inspiring
    January 9, 2017

    Thank you.