Previous Topic

Next Topic

Book Contents

Book Index

Import Designer - Definition tab

Navigator > Setup > Data Interchange > Import Designer > Definition tab

Use the Import Designer to create import routines to import data from files into Accredo. The Definition tab contains the import file details and the MaxBasic code to execute to complete the import. The code on the Definition tab should call:

EDI Import definitions require knowledge of MaxBasic scripting and Accredo Automation objects. Designing import definitions and ensuring correct validation of imported data is a specialised task. Contact your Accredo QSP if you require assistance.

Sample import definition files for most masterfiles are provided in the \Imports\EDIImports\SampleImports directory. Corresponding export script files for all import files are also provided in the \Scripts\EDIExports\SampleExports directory. We recommend starting with a sample import definition and modifying it to meet your requirements.

See also the Import Invoices Example.

Input Format

Select the import file type.

Note: If your file contains embedded line-feed characters within fields, as can occur in CSV files saved from MS Excel, you should select User Delimited with the default delimiter Chr(13) & Chr(10).

CSV/Tab Delimited CRLF Terminated

Comma separated value file or Tab delimited file, with lines terminated by Carriage Return Line Feed (CRLF) characters.

Fields are optionally enclosed in quotation marks (" "), and are separated by commas or the Tab CHR(9) character. Record terminators do not consider quotes.

CSV/Tab Delimited LF Terminated

Comma separated value file or Tab delimited file, with lines terminated by a Line Feed (LF) character.

  • Fields are optionally enclosed in quotation marks (" "), and are separated by commas or the Tab CHR(9) character. Record terminators do not consider quotes.

CSV/Tab Delimited Any Terminator

Comma separated value file or Tab delimited file, with lines terminated by either Line Feed (LF), Carriage Return (CR) or Carriage Return Line Feed (CRLF) characters.

Fields are optionally enclosed in quotation marks (" "), and are separated by commas or the Tab CHR(9) character. Record terminators do not consider quotes.

ASCII Fixed Widths

Fixed width ASCII file. Fields are located at fixed positions across each line of the import file.

User Delimited

The Separator and Terminator selections become available.

  • Separator - the character(s) that separates the fields. Defaults to ",".
  • Terminator - the character(s) that separates the lines. Defaults to CRLF Chr(13) & Chr(10).

Excel Worksheet

The Excel Worksheet selection becomes available, and defaults to the first worksheet. Select the sheet from your workbook.

Note: Do not use apostrophes (') in worksheet names, as this can cause problems.

 

Unquoted

Unquoted checkbox is enabled when any of the CSV Input formats is selected.

Unselected, the default. Quotes around field values are treated as metadata.

Selected, quotes are treated as data only not metadata - select to handle CSV files where no values are quoted and data values include quote marks.

Default Input File

The path and filename of the EDI import data file.

When you use EDI Importing, this file name will be set by default. To have the user select the file name and path, clear this field before you Save.

May be specified as just a default path ending with \ which will set the default folder for browsing to select the Input file.

Add Line Type (Alt+Y)

Delete Line Type (Alt+D)

Insert a new line type tab or delete the last line type tab. Include one line type for each type of data line in the import file.

First Line Contains Header checkbox

Selected, the input file contains one or more Header lines.

Perform Import

Code to execute the import. You can use Accredo automation.

Code Editor

Objects:

Company

Contains details of the Company name and address.

ImportFile

Properties and methods for the input file to be imported.

System

Fields from the System record.

SystemUser

Fields from the System User record.

User

Fields from the User record.

Note: See Import Functions for functions specific to the Import Designer.

Buttons

ScriptCheck

Check Code (Alt+C)

Check that the code entered compiles correctly.

Breakpoint (Alt+B)

Set a code breakpoint on the current line. Click again to toggle to clear the breakpoint. You can also click to the right of a line to set or clear a breakpoint.

Hover the mouse over a breakpoint, then right-click to make a breakpoint unavailable, or access the Breakpoint Properties.

If a condition has been set for a breakpoint, it will be shown when you hover over the breakpoint.

Run (Alt+R)

Run the import from the Design Window using the file selected from Default Input file. You can run the import against test data. Imported records are not removed from the import file.

View Data... (Alt+W)

Formatted data from the input file displays in a grid. You can check the format validity against the data.

Print (Ctrl+P)

Print the code from the different tabs.

Load... (Alt+L)

Load an Import Definition file.

Save... (Ctrl+S)

Save the Import Definition file.

In This Section

Import Designer - Process Save tab

Import Designer - Line Type tabs

Import Designer - Comment tab

Import Invoices Example