Notifications

26 views

Symptoms


When trying to decrease the max length for a field, errors similar to the one below will display at the header of the dictionary record:

"Length change not allowed. The field '<field name>' on table '<table name>' contains existing data records (<number of records exceeding the desired max_length>) that exceed the new length of <desired max_length>.
 
Invalid update"
 

Release


All currently supported versions.

 

Cause


Even though the "Character count" for the field in all the records with data in them, does not exceed the desired Max length, the database takes into consideration the bytes consumed, not the characters.

The number of bytes special characters consume affect the number of bytes counted which will not always be the number of characters displayed (for example the smart/curtly quotes (‘ ’  as opposed to ' ').

 

 

 

Another possibility is that the field which I want to change is encrypted, that also affects the number of bytes stored

                                       

 

 

Resolution


  • There are some websites which are a helpful tool to Counts bytes or Characters in order to double-check the data stored in the fields.

 

  • To decrease the Max length of the field, I need to decrease the data stored in that field for the records exceeding the limit. See Modify string field length. The reason behind the platform's restriction is to avoid data being removed unintentionally from the instance.  

 

 

 

 

 

Article Information

Last Updated:2019-02-21 06:48:39
Published:2019-02-21
Curly quotes counter.pngEncrypted text.pngSmart quotes counter.png