Framework EDI Reference. Methods and Properties
ediDataElement. Definition

Returns the definition object of the data element.

Syntax:

Returns:

Returns an object of type FREDI.ediScmDataElement if the matching definition was found in the schema for the data element.  Otherwise NULL or empty is returned.

Remarks

The definition object ediScmDataElement contains all defined properties of the data element as extracted from the schema.

Example

Dim oDataElement As Fredi.ediDataElement
Dim oDataSegment As Fredi.ediDataSegment
Dim oElementDef As Fredi.ediScmDataElement
Dim sElmProperties As String

...

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

' Get the data element that is the 5th position of the BEG data segment.
Set oDataElement = oDataSegment.GetDataElementByPos("\ISA\GS\ST\BEG<373>")

' Get the data element definition object.
Set oElementDef = oDataElement.Definition

' Display data element properties queried from definition object.
sElmProperties = sElmProperties & vbTab & "ID = " & oElementDef.ID & vbCrLf
sElmProperties = sElmProperties & vbTab & "Desc = " & oElementDef.Description & vbCrLf
sElmProperties = sElmProperties & vbTab & "Data Type = " & oElementDef.DataType & vbCrLf
sElmProperties = sElmProperties & vbTab & "Min Length = " & oElementDef.MinimumLength & vbCrLf
sElmProperties = sElmProperties & vbTab & "Max Length = " & oElementDef.MaximumLength & vbCrLf

MsgBox "Element Definition: " & vbCrLf & vbCrLf & sElmProperties

 

Sample

P_Definition.zip