When you design a dataport in Microsoft Dynamics NAV, you set properties on the dataport that describe the dataport and specify the format of the external file. The Import Property and FileName Property can be set and reset dynamically. For example, you can create a dataport that allows the user to decide whether to import or export, or to select the name of the external file to read from or write to. Alternatively, you can generate a file name automatically after the dataport is run.
Properties for a Dataport
The following table lists properties that you can set for a dataport.
Property | Description | ||
---|---|---|---|
The ID of the dataport—must be unique among dataports. |
|||
The name of the dataport. |
|||
The caption shown on the request form window. For example, the default value in English (United States) is the same as the name of the dataport. |
|||
The list of translations of the object’s caption. |
|||
Defines if the dataport imports or exports data. Alternatively, you can set this dynamically in the OnPreDataPort Trigger. It cannot be changed after the OnPreDataPort Trigger has been run. |
|||
The name of the external file to write data to or read data from. This property can be set dynamically. If you reset the file name after a file has been opened, this file is closed and a new file is opened. |
|||
Variable —or— Fixed Defines the format of the external file. |
|||
When FileFormat is Variable, this property is used to define the string that marks the beginning of a field on input or output. |
|||
When FileFormat is Variable, this property is used to define the string that marks the end of a field on input or output. |
|||
When FileFormat is Variable, this property is used to define the string that separates fields on input or output. |
|||
The string that separates records on input or output. |
|||
The string that separates data items on input or output. |
|||
Defines if the request form should be run before the dataport is run.
|
|||
Defines if a status window will be shown while the dataport is running. This window also has a Cancel button that you can use to interrupt the dataport run, otherwise this is only possible if you create a dialog yourself. |
|||
Browse, Snapshot, UpdateNoLocks, or Update. The transaction type defines the behavior of a transaction in Microsoft Dynamics NAV and takes effect from the beginning of a transaction. |
|||
The permissions of the dataport to access database objects. The dataport can have wider permissions than the individual user. This means that the user might be able to use dataports that retrieve information from tables that the user cannot usually access. |
Remarks
The FieldStartDelimiter Property and the FieldEndDelimiter Property are used to place the contents of a field in quotation marks if the data in the field contains the character that is defined as a separator (FieldSeparator Property, RecordSeparator Property, or DataItemSeparator Property). These delimiters are not required. This means that if only one field of a record needs to be placed in quotation marks, only this field has to be enclosed by the FieldStartDelimiter Property and FieldEndDelimiter Property characters. The other fields can optionally have the delimiters; it makes no difference when you are importing. When you are exporting, all the fields are written to the external file with all the delimiters and separators.
See Also
© 2010 Microsoft Corporation. All rights reserved.