KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Maximum variable name length for check boxes, radio buttons, and other objects
PRODUCT: 4D | VERSION: | PLATFORM: Mac & Win
Published On: August 25, 2000

The maximum length that you should use for a check box variable name is 30 characters. If the variable name is longer, you won't be able to programmatically toggle the check box between its selected and unselected states.

The same limitation also applies to radio buttons.

If you are using a variable to display a value on a form, no value will be displayed if the variable's name is over 30 characters long. (But the variable will actually hold the value, which you can confirm in the debugger.)

This character count does not include the diamond symbol used to begin the name of an interprocess variable.

One good reason not to use 31 characters for variable and field names is that Oracle and some of the other high-end products limit you to 30 characters. If you needed to clone 4D tables in these products, and you had field names 31 characters long where the only difference was the last character, this would cause you problems.

If you want to know which variable names in your structure are 31 characters long, use 4D Insider to print out the list of variables in a large mono-spaced font, and check the name lengths with a ruler.