When you design a dataport in Microsoft Dynamics NAV, you add
data items, and you set properties on the fields in the data items.
If the FileFormat
Property for the dataport itself is set to Fixed,
you use the StartPos
Property and Width Property (Dataport
field) of each field to define how a record that is read
from the external file is broken into fields. When you are
exporting, these properties determine how data from the database is
written to the external file.
Properties for a Data Item
Field
The following table lists properties that you can set for a
field on a data item in a dataport.
Property |
Description |
Enabled
Property
|
Defines if the field is enabled or disabled. A field that is
disabled is imported from the external file, but will not be
inserted into the record.
|
SourceExpr
Property
|
The source expression of the field. When you are importing, this
could be the name of the database table field where the value that
is read from the external file should be stored, but it can be any
valid C/AL variable. When you are exporting, this could be the
value that is exported to the external file, such as the name of a
database table field, but it can be any valid C/AL expression.
|
Caption
Property
|
The caption in the currently selected language.
The value is taken from the CaptionML
Property if this property is set. For example, the
default value in English (United States) is the same as the name of
the field.
|
CaptionML
Property
|
The list of all the translations of the field’s caption
|
StartPos
Property
|
If the FileFormat
Property for the dataport itself is set to Fixed,
this field defines the starting position of the data item field.
Positions are numbered starting at 1.
|
Width Property (Dataport
field)
|
If the FileFormat
Property for the dataport itself is set to Fixed,
this field defines the width of the field.
The following table describes the default values for the
Width Property (Dataport
field) for each field data type.
Field data type |
Width assigned |
Code
|
If actual length > 10, actual length is used, otherwise
10.
|
Text
|
If actual length > 30, actual length is used, otherwise
30
|
Date
|
11
|
Time
|
10
|
Option
|
10
|
Decimal
|
12
|
Integer
|
7
|
Boolean
|
10
|
|
CallFieldValidate
Property
|
Defines if the OnValidate (Fields)
Trigger is executed when the field is imported.
|
Format
Property
|
Determines how the field is formatted during exportation. For
example, you can determine the number of decimal places.
|
AutoCalcField
Property
|
Defines if the field is a FlowField that must be automatically
calculated.
|
Remarks
See Also