Receiving 'Invalid Variable Name' Errors When Creating Components

Problem

When I create a new variable and try to save it, HotDocs displays an Invalid Variable Name error message. What am I doing wrong that causes this error to appear?

Solution

When naming variables, there are a few rules you must follow:

  • A variable name can have up to 50 characters, including letters, numbers, and some symbols.
  • The first character in a variable name must be a letter.
  • Each variable name must be unique. Even if the variables are different types, their names cannot be identical.
  • DO NOT use all uppercase letters in your variable names. Because HotDocs instruction and expression keywords use uppercase letters, you may inadvertently use a word that may someday become a keyword, which will prevent HotDocs from reading your variable name correctly. (See Introduction: Instruction and Expression Models.)
  • Do not use any of the following characters when naming your components:

    . (period)

    $ (dollar sign)

    " (quotation mark)

    : (colon)

    [ ] (brackets)

    , (comma)

    ( ) (parenthesis)

    % (percent)

  • These characters can be used only if there is a character other than a space immediately before or after it:

    + (plus)

    - (hyphen)

    * (asterisk)

    / (forward slash)

    > < (greater than and less than signs)

    >= <= (greater than or equal to and less than or equal to signs)

    = (equals)

    != (does not equal)