FAQ: How do I correct import errors related to exceeding maximum field lengths?

If a field in a source application exceeds the max field length allowed by the destination application, you might receive an error message. You can correct max field length errors with one of the following options:

  • Increase the maximum field length in the destination application to accommodate the additional characters.
  • Shorten the string you are importing. See Error: EXCEEDED_MAX_FIELD_LENGTH.
  • If you do not need to have the complete text from the source application included in the destination, you can use the substring handlebars expression to truncate the source field to the maximum allowed length:
{{substring "ExampleField" "0" "45"}}

Hey Tom, I'm trying this out with code {{substring note_attributes.0.value "0" "300"}} and received the following error:

"Unable to create the order in NetSuite for the Shopify order #XYZ Could not compile handle bar \"{{substring note_attributes.0.value \"0\" \"300\"}}\" because \"handlebars helper {{substring}} expects string type argument\" .Please correct and retry"

Do i need to specify that the data type is string or would that not matter if the source data is not string? Also it's a multi field mapping type for reference. The destination field has a character limit of 300.

@namgyalschaaf

Not sure if you have found resolution to this, but I have seen this when the source field is null and thus not passed into the integration vs showing as "". Try this to validate that the field is present first, then the expression should work.

{{#if note_attributes.0.value}}{{substring note_attributes.0.value "0" "300"}}{{else}}{{/if}}