String Field Sizes

String Field Sizes

Comments

  • We see string fields in the db are created as nvarchar(254). We received requirements to put validation on text boxes to prevent a user from entering more than 254 chars. Is this already prevented in Decisions behind the scenes? If not what would happen if more than 254 was entered? Would a fatal exception occur or would the exception be handled?

  • Hello,

    To clarify, are the requirements because the database defaults the string to 254 characters?

    If you would like to increase the size of a string getting saved to the database, you can edit your respective data structure, select the desired variable, and set Override Text Field Storage" to True. You should then see a drop down called Text Length
    
  • In our more recent versions, namely 5.15 and forward, we made the option to overwrite the default string length easier to find on the data structure.

    To get to this field, navigate to your database structure in decisions and click on it. Select the option to "edit" your structure. Once you are looking at your structure, click on your string field to show the advanced properties on the right hand side and near the top you should see an option to select Text length.
    "[img]att1[/img]"

    [i]
    [/i]
    [i]edited by bryan.thomas@decisions.com on 1/3/2020[/i]

Sign In or Register to comment.