go to post Kimberly Dunn · Dec 1, 2020 Hi Graham, Removing the std attribute was the correct way to avoid your original error. The new error that you are seeing indicates that there is a typo in your MessageStructure definition such that the total number of opening and closing brackets do match, but somewhere the definition includes "~]k~", which is not allowed. There should be a "~" separating the bracket and any segment references; since there isn't, we are interpreting the "]k" as being a segment reference, but, of course, that is not a recognized SegmentStructure name. My guess would be that the "k" was added accidentally. -Kimberly
go to post Kimberly Dunn · May 30, 2019 Hi Jason,You can make use of the EnsLib.EDI.X12.Document property SegCount, which keeps count of the number of segments in the document. In the Data Transformation, you can add an assign action after all of the segments have been added in order to set the value of the SE01 element. To do this, you should set the 'Property' of the assign action to target.{SE:NumberofIncludedSegments} and set the 'Value' of the assign action to target.SegCount.Hope to help!-Kimberly