"Trim" Leading and trailing spaces and zeros policy not working? BizTalk 2013R2 RRS feed

  • Question

  • Hello,

    I am trying to generate an EDI850 file for a specific party, who does not allow leading and trailing spaces in the fields we send them. In the Agreement settings, under the OurParty->DestinationParty tab, Transaction Set Settings > Validation, I added 850 as a transaction type and set "Leading and traling spaces and zeros policy" to "Trim".

    When I try to generate the EDI850 file, everything looks fine in terms of delimiters and all, however there are still trailing spaces, for example in the N902 field.

    What am I missing?

    Using BizTalk 2013R2 with CU5 applied.


    • Edited by Steven G_ Wednesday, May 3, 2017 7:52 PM
    Tuesday, May 2, 2017 2:16 PM

All replies

  • First, make sure the Fallback Settings are disabled to ensure you are resolving to the correct Agreement.

    However, when sending EDI, it's much better to properly format the data yourself, rather than rely on the somewhat limited abilities of the EDI Assembler.

    Meaning, you should be taking care of any extraneous characters in the Map before the EDI Assembler even sees the data.

    Tuesday, May 2, 2017 4:32 PM
  • The Fallback settings are already disabled.

    I could modify the map, and trim every single field I am mapping, however this process is already in production so I was trying to see if the functionality provided by BizTalk to trim the spaces would work instead, as it would not require me to re-deploy the solution and have some down time.

    So, when you say that I should not rely on the EDI Assembler... does that mean that this is a known bug in the Trim setting functionality?

    • Edited by Steven G_ Tuesday, May 2, 2017 8:39 PM
    Tuesday, May 2, 2017 8:36 PM
  • No, it is not a bug.  However, it's possible that that setting does not apply to outgoing Interchanges.

    Full disclosure, I've never even tried to use that.  I always apply the correct formatting in the Map or other upstream component.

    Wednesday, May 3, 2017 1:43 PM
  • It does look like a bug, because the "Allowed" and "Not Allowed" options seem to work for outgoing interchanges, but "Trim" seems to be the only option that doesn't do anything.

    The following explains a bit how the 3 options are supposed to work, and it seems implied that it should work for outgoing interchanges:

    I understand there are workarounds, but because this is already a production process, we wanted to see if anyone else could make the Trim functionality work out of the box, as it is supposed to.

    Wednesday, May 3, 2017 7:51 PM