Returns the index location of the data element in the collection.
Syntax:
Remarks:
The index location of the data element is its physical location in the collection of data elements belonging to the data segment or composite element. Two data elements that are repeating instances may have the same position number but will have different index numbers.
Example
Dim oEdiDoc As Fredi.ediDocument
Dim oSchemas As Fredi.ediSchemas
Dim oSchema As Fredi.ediSchema
Dim oComposite As Fredi.ediDataElement
Dim oAllElements As Fredi.ediDataElements
Dim oDataSegment As Fredi.ediDataSegment
Dim sElements As String
Dim i As Integer
' Create instance of Framework EDI.
Set oEdiDoc = New Fredi.ediDocument
' Disable standard reference library.
Set oSchemas = oEdiDoc.GetSchemas
oSchemas.EnableStandardReference = False
' Load the schema that the EDI file will use.
Set oSchema = oEdiDoc.LoadSchema(App.Path & "\SampleSefX12_850.SEF", Schema_Standard_Exchange_Format)
' Process the EDI file.
oEdiDoc.LoadEdi App.Path & "\SampleEdiX12_850.X12"
' Get first data segment in document.
Set oDataSegment = oEdiDoc.FirstDataSegment
' Get the composite element.
Set oComposite = oDataSegment.GetDataElementByPos("\ISA\GS\ST\PO1\SLN\SLN<C001>")
' Get the object containing the collection of sub elements.
Set oAllElements = oComposite.DataElements
For i = 1 To oAllElements.Count
Dim oSubElement As Fredi.ediDataElementNext
Set oSubElement = oAllElements.DataElement(i)
' Show index number of each data element.
sElements = sElements & oSubElement.Position & vbTab & oSubElement.ID & vbTab & "Index: " & oSubElement.IndexNumber & vbCrLf
MsgBox "List of elements: " & vbCrLf & vbCrLf & sElements
Sample