Returns the data element object in the document tree hierarchy that was specified by the hierarchical string
Syntax:
Parameters:
Returns
Object of type FREDI.ediDataSegment.
Remark
This method is only supported when the Cursor Type is set to Dynamic, and is only recommended for short EDI files.
Example
'Getting the N1 segment from loop N1 from the root of the hierarchy
Set oSegmentLoop = oSegment.GetDataSegmentByPos("\ISA\GS\ST\N1\N1")
txtShipToName.Text = oSegmentLoop.DataElementValueByPos("N1<93>")
txtShipToDUNS.Text = oSegmentLoop.DataElementValueByPos("N1<67>")
txtShipToAddress.Text = oSegmentLoop.DataElementValueByPos("N3<166>")
txtShipToCity.Text = oSegmentLoop.DataElementValueByPos("N4<19>")
txtShipToState.Text = oSegmentLoop.DataElementValueByPos("N4<156>")
txtShipToZip.Text = oSegmentLoop.DataElementValueByPos("N4<116>")