Framework EDI Reference. Methods and Properties
ediDataElements. DataElement

Gets the data element member in the collection.

Syntax:

Parameters:

Returns

Returns an object of type FREDI.ediDataElement; otherwise empty object or NULL.

Remarks

This property gets the data element in a specific position within a collection of data elements contained in a data segment or a composite element. If the parameter is less than 1 or exceeds the number of data elements, then the property returns an empty value.

Example

Dim oDataElements As Fredi.ediDataElements
Dim oDataSegment As Fredi.ediDataSegment

....

' Get first data segment in document.
Set oDataSegment = oEdiDoc.FirstDataSegment

' Get the data segment.
Set oDataSegment = oDataSegment.GetDataSegmentByPos("\ISA\GS\ST\BEG")

' Get the object containing the collection of data elements.
Set oDataElements = oDataSegment.DataElements

For i = 1 To oDataElements.Count

Dim oDataElement As Fredi.ediDataElement

Set oDataElement = oDataElements.DataElement(i)

' Show some element properties.
sElements = sElements & oDataElement.Position & vbTab & oDataElement.ID & vbTab & oDataElement.Description & vbCrLf
Next

Sample

M_DataElement.zip