I am getting the error below when trying to save a long text input to the databa

I am getting the error below when trying to save a long text input to the database using the Write to Data Store Entity Smart Service. Does anyone know what the max length allowed for a paragraph text field is when saving to the database?

And why is that max allowed length not part of the paragraph field documentation in Appian Docs or the write to data store documentation in Appian Docs?

Thanks,
Gregg

There is a problem with task “Create Active Contract in App Datastore” in the process “Contracting: IT Contract Request initiated by Gregg Lipson”. An error occurred while trying to write to the entity “contracts” [id=182d6f12-e7a0-4433-8e64-c78058a874b9@15546, type=CMcontract (id=3150)] (data store: contractManagerDatastore). Details: org.hibernate.exception.DataException: could not insert: [CMcontractDT1719]: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'contractdescription' at row 1 Data: TypedValue[it=3150,v={<...

OriginalPostID-163783

OriginalPostID-163783

  Discussion posts and replies are publicly visible

  • ...null>,,2015-08-24 19:46:08.45,,<null>,,glipson,<null>,333,testing long description testing long description testing long description testing long description testing long description testing long description testing long description testing long description testing long description testing long description testing long description testing long description testing long description testing long description testing long description testing long description ,3.3333333E7,Bike,2015-08-03,2015-08-03,333,333,glipson,glipson,<null>,,,[Folder:22137],Bike New,,<null>}]
    Problem: An error occurred in executing an Activity Class.
    Recommended Action: Examine the activity class to correct the error and then resume.
    Priority of this problem: High Priority
    View the Process for this Task.
  • @greggl Hi, one of the prime causes for this error is, trying to insert the data of length which is beyond the capacity of column. Let's say 'contractdescription' column can hold only 10 characters and if we try to insert a value which has 11 characters, then the write operation fails by throwing "com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column" error.
  • @greggl Further to the best of my knowledge, the max length shouldn't be an attribute of Appian but is an attribute of the Database (vendor specific) which we make use of. Appian is just a medium which helps us capturing the data (via user interface/ smart services) and further puts the data in the database (via Integrations smart services).
  • I am saving to the built-in Appian MySQL database. The data type of that field is Text, so how big does Appian make the column? Is there a way to adjust and add to the allowed width Appian sets on the column?

    Thanks
  • Appian text fields don't have data caps anymore, but Siki is right--it's an issue with writing it to the database. If this was a database that Appian created in MySQL (using a CDT), then text defaults are 255. However, you can adjust the table constraint on the actual database. For new columns, you can increase the number of characters using the JPA annotaiton @Column(columnDefinition="varchar(4000)") or some other character size. For more information on the JPA annotations, the Custom Data Types from XSD page has a lot of good info.

    forum.appian.com/.../Custom_Data_Types_from_XSD.html