Why does Field Length Validation behave differently between Profile Types?

Document created by chris_stevens Employee on Sep 10, 2015Last modified by laura_seybold on Mar 1, 2016
Version 2Show Document
  • View in full screen mode
Field Length Validation is an option available on different Profile Types, such as Flat File, XML, EDI, and Database (JSON is not currently supported). Depending on the profile type where you're specifying the Field Length Validation settings, will determine how it behaves.

 

0EM40000000bsUL
** Screenshot above may appear differently, based on Profile Type used. **

 

XML/Flat File/Database:
Example 1:
Data (XML): <root><itemNumber>123</itemNumber><desc>this is a description</desc></root>
Field Length Validation settings for each field: Min = 5, Max = 5
Result will be: Error. Invalid Data Element 'this is a description': MAX_LENGTH_EXCEEDED

Example 2:
Data (XML): <root><itemNumber>123</itemNumber><desc>this is a description</desc></root>
Field Length Validation settings for each field: Min = 50, Max = 50
Result will be: Error. Invalid Data Element 'this is a description': MIN_LENGTH_NOT_REACHED

EDI:
Example 1:
Data: ABC|12345678|ABC123
Field Length Validation settings for each field (Note "ABC" is header): Min = 5, Max = 5
Result will be: "ABC|12345|ABC12" (without quotes)

 

Example 2:
Data: ABC|12345678|ABC123
Field Length Validation settings for each field (Note "ABC" is header): Min = 10, Max = 10
Result will be: "ABC|12345678  |ABC123    " (without quotes)
Why does EDI behave differently than XML, Flat File, Database, and JSON Profile Types? The answer, is because EDI relies on data in a specific from the source, and that must be agreed upon between the source and destination sources. These lengths should not change, and should be "set-in-stone". XML and others can have varying lengths due to different data that is being passed through, for example, names, addresses, etc.

 

If you still wish to achieve Field Length Validation with EDI, it is recommended to use a Cleanse Shape, prior to your mapping. Please see the screenshots below:

 

Sample Process:
0EM40000000bsUQ

 

EDI Profile Configuration:
0EM40000000bsUV

 

Cleanse Shape Configuration:
0EM40000000bsUa
Therefore based on the above, if the field length is:
< 5 characters, it'll reject the document (down the reject path).
> 5 characters, it'll reject the document (down the reject path).
= 5 characters, it'll accept the document (down the accept path).

You're also able to append/prepend characters if it's too short, and trim leading/trailing characters if it's too long.

 

Tip: You'll need to have the Field Length Validation options selected within the EDI Profile for the Cleanse Shape to allow configuration on each specific field.

 

More information regarding the Cleanse Shape can be found here: http://help.boomi.com/atomsphere/GUID-652D6E11-9D6B-491B-8868-9905C48661F3.html
1 person found this helpful

Attachments

    Outcomes