Difference between revisions of "Getting started - Data Import"
(→Options) |
m |
||
(10 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
== Summary == | == Summary == | ||
The following article explains how to create a data import template so that you are able to import information from plain text files into the system. | The following article explains how to create a data import template so that you are able to import information from plain text files into the system. | ||
− | |||
== More Information == | == More Information == | ||
=== What is a Template? === | === What is a Template? === | ||
− | A template tells Platinum: | + | A template tells Platinum: |
+ | |||
+ | * What information you want to import. | ||
+ | * Which part of the system you want to import data into e.g. | ||
+ | |||
+ | {{Example|text=The "Stock File", the "Unit Stock File", the "Accounts Transaction File" etc.}} | ||
− | |||
− | |||
* Where the file is that holds the data you are importing. | * Where the file is that holds the data you are importing. | ||
− | * Which fields within the chosen system you are importing data into | + | * Which fields within the chosen system you are importing data into. |
+ | |||
+ | {{Example|text={{DataPrompt|Stock Code}} field, {{DataPrompt|Stock Description}} field, {{DataPrompt|Account Name}} etc.}} | ||
=== Process === | === Process === | ||
Go to {{Menu|{{IM}}}}. | Go to {{Menu|{{IM}}}}. | ||
− | + | ||
This will take you to a screen where you can search for existing Data Import templates or create a new one. | This will take you to a screen where you can search for existing Data Import templates or create a new one. | ||
==== Template Code ==== | ==== Template Code ==== | ||
{{Note|text=Each template should have a unique code {{Example|text={{DataValue|001}} or {{DataValue|STO}} (max. 3 character.)}}}} | {{Note|text=Each template should have a unique code {{Example|text={{DataValue|001}} or {{DataValue|STO}} (max. 3 character.)}}}} | ||
− | * Enter a code for the template and press {{KeyPress| | + | * Enter a code for the template and press {{KeyPress|ENTER}}. |
− | * Type a description for the template | + | * Type a description for the template. |
{{Example|text={{DataValue|Stock File Import}}.}} | {{Example|text={{DataValue|Stock File Import}}.}} | ||
==== Destination ==== | ==== Destination ==== | ||
− | {{Note|text=The Destination is the file you want to import data | + | {{Note|text=The Destination is the file into which you want to import data. Click [[Data Import Destinations|here]] to view a list of possible destinations.}} |
− | * Press {{KeyPress|S-F2}} to view a list of destinations then press the {{KeyPress|Up}}/{{KeyPress|Down}} key to scroll through the list and press {{KeyPress|F2}} to select the desired one. | + | * Press {{KeyPress|S-F2}} to view a list of destinations then press the {{KeyPress|Up}}/{{KeyPress|Down}} key to scroll through the list and press {{KeyPress|F2}} to select the desired one. |
* Alternatively type in the destination file code. | * Alternatively type in the destination file code. | ||
==== Source File ==== | ==== Source File ==== | ||
− | {{Note|text=The Source File is the file containing the data you wish to import. Your Source file will usually contain a series of records. A record is each line or lines of information relating to the same Stock Code, | + | {{Note|text=The Source File is the file containing the data you wish to import. Your Source file will usually contain a series of records. A record is each line or lines of information relating to the same Stock Code, Unit, Account etc. The Data Import program can read most Plain Text files, e.g. {{FileExt|CSV}} (Comma Separated Variable) files and {{FileExt|TXT}} (Text) files.}} |
− | * Enter the name of, and if necessary the Path to, the file which holds the data to be imported | + | * Enter the name of, and if necessary the Path to, the file which holds the data to be imported. |
{{Example|text={{FilePath|C:\STOCKFILE.CSV}}.}} | {{Example|text={{FilePath|C:\STOCKFILE.CSV}}.}} | ||
− | * If you need to find a file, press {{KeyPress|C-F1}} and search for the file using the explorer window. | + | * If you need to find a file, press {{KeyPress|C-F1}} and search for the file using the explorer window. |
− | Press {{KeyPress| | + | Press {{KeyPress|ENTER}} to move to the template import configuration. |
==== Variables ==== | ==== Variables ==== | ||
− | {{Note|text=A variable tells the system which field to look at {{Example|text=There is a variable for the Stock Code field, the Account Code field, the | + | {{Note|text=A variable tells the system which field to look at {{Example|text=There is a variable for the Stock Code field, the Account Code field, the Unit Model field etc.}} |
− | Each field within a Destination File, into which you can import data, has a variable. The actual variable code will vary depending on the Destination File so for further information on Variables available for each Destination File click [[Category:Data_Import| | + | Each field within a Destination File, into which you can import data, has a variable. The actual variable code will vary depending on the Destination File so for further information on Variables available for each Destination File, click [[Category:Data_Import|here]].}} |
* Select a variable by typing in the variable number or: | * Select a variable by typing in the variable number or: | ||
** Press {{KeyPress|F1}} or {{KeyPress|S-F1}} to cycle through the possible fields you can import into in the chosen destination file. | ** Press {{KeyPress|F1}} or {{KeyPress|S-F1}} to cycle through the possible fields you can import into in the chosen destination file. | ||
− | ** Alternatively press {{KeyPress|F2}} to view a list of the available fields, use the {{KeyPress|UP}}/{{KeyPress|DOWN}} key to browse the list and press {{KeyPress|F2}} to select the variable. | + | ** Alternatively, press {{KeyPress|F2}} to view a list of the available fields, use the {{KeyPress|UP}}/{{KeyPress|DOWN}} key to browse the list and press {{KeyPress|F2}} to select the variable. |
− | Press {{KeyPress| | + | Press {{KeyPress|ENTER}} to move to the options column. |
==== Options ==== | ==== Options ==== | ||
− | You will find some variables have various letters and numbers in brackets alongside them, these are known as {{DataPrompt|options}}. {{DataPrompt|Options}} are available when you have a choice over where the data is imported on a single variable. | + | You will find some variables have various letters and numbers in brackets alongside them, these are known as {{DataPrompt|options}}. {{DataPrompt|Options}} are available when you have a choice over where the data is imported on a single variable. |
− | {{Example| | + | {{Example|text=When importing addresses into the Account Address File, {{DataValue|LDAD}}, variable 18, Account Address, options 1-5 are available to define into which line of the address you want to import.}} |
==== Expression ==== | ==== Expression ==== | ||
− | The {{DataPrompt|Expression}} is how you tell the system whereabouts in the source file it will find the required data and how it should be handled. | + | The {{DataPrompt|Expression}} is how you tell the system whereabouts in the source file it will find the required data and how it should be handled. |
The first part of the expression defines whether the imported data is text or numeric. {{DataValue|ST}} denotes that the data is to be text or a combination of text and numeric characters. {{DataValue|NU}} denotes that the imported data will be just numeric. It is important to specify the correct data type when importing to avoid errors - if you are unsure of what the type should be, the {{DataPrompt|Type}} field will show a {{DataValue|T}} for text or {{DataValue|N}} for numeric. | The first part of the expression defines whether the imported data is text or numeric. {{DataValue|ST}} denotes that the data is to be text or a combination of text and numeric characters. {{DataValue|NU}} denotes that the imported data will be just numeric. It is important to specify the correct data type when importing to avoid errors - if you are unsure of what the type should be, the {{DataPrompt|Type}} field will show a {{DataValue|T}} for text or {{DataValue|N}} for numeric. | ||
Line 64: | Line 68: | ||
To import text values from a {{FileExt|CSV}} file, the following expression will be used : | To import text values from a {{FileExt|CSV}} file, the following expression will be used : | ||
− | {{Example|text= ST{1(,)} }} | + | {{Example|text= ST{1(,)} }} |
This example will import the text string from column 1 of the source file where {{DataValue|,}} is the delimiter character. | This example will import the text string from column 1 of the source file where {{DataValue|,}} is the delimiter character. | ||
Line 70: | Line 74: | ||
To import numeric values from a {{FileExt|CSV}} file, the following expression will be used : | To import numeric values from a {{FileExt|CSV}} file, the following expression will be used : | ||
− | {{Example|text=NU{2(,)} }} | + | {{Example|text=NU{2(,)} }} |
This example will import the numeric string from column 2 of the source file where {{DataValue|,}} is the delimiter character. | This example will import the numeric string from column 2 of the source file where {{DataValue|,}} is the delimiter character. | ||
=== Further Information === | === Further Information === | ||
− | Do be careful to check your template before you use it. It is worth taking ten lines out of your source file, creating a separate file and using this to check that everything is going to the correct place. It can save you an awful lot of bother if your template is not quite right. | + | Do be careful to check your template before you use it. It is worth taking ten lines out of your source file, creating a separate file and using this to check that everything is going to the correct place. It can save you an awful lot of bother if your template is not quite right. |
== See also == | == See also == | ||
Line 81: | Line 85: | ||
* [[How do I export a Data Import template?]] | * [[How do I export a Data Import template?]] | ||
* [[How do I import a Data Import template?]] | * [[How do I import a Data Import template?]] | ||
+ | * [[Data Import Destinations]] | ||
* [[Useful Keys]] | * [[Useful Keys]] | ||
− | {{KB_Tags| | + | {{KB_Tags|get, start, getting, started, getting started, data, import, create, creating}} |
− | {{ | + | {{GStart}}{{KB_IM}} |
Latest revision as of 16:15, 20 February 2019
Contents
Summary
The following article explains how to create a data import template so that you are able to import information from plain text files into the system.
More Information
What is a Template?
A template tells Platinum:
- What information you want to import.
- Which part of the system you want to import data into e.g.
The "Stock File", the "Unit Stock File", the "Accounts Transaction File" etc. |
- Where the file is that holds the data you are importing.
- Which fields within the chosen system you are importing data into.
"Stock Code" field, "Stock Description" field, "Account Name" etc. |
Process
Go to " Data Import".
This will take you to a screen where you can search for existing Data Import templates or create a new one.
Template Code
Each template should have a unique code
|
- Enter a code for the template and press <Enter>.
- Type a description for the template.
'Stock File Import'. |
Destination
The Destination is the file into which you want to import data. Click here to view a list of possible destinations. |
- Press <Shift+F2> to view a list of destinations then press the <Up Arrow>/<Down Arrow> key to scroll through the list and press <F2> to select the desired one.
- Alternatively type in the destination file code.
Source File
The Source File is the file containing the data you wish to import. Your Source file will usually contain a series of records. A record is each line or lines of information relating to the same Stock Code, Unit, Account etc. The Data Import program can read most Plain Text files, e.g. '.CSV' (Comma Separated Variable) files and '.TXT' (Text) files. |
- Enter the name of, and if necessary the Path to, the file which holds the data to be imported.
'C:\STOCKFILE.CSV'. |
- If you need to find a file, press <Ctrl+F1> and search for the file using the explorer window.
Press <Enter> to move to the template import configuration.
Variables
A variable tells the system which field to look at
|
- Select a variable by typing in the variable number or:
- Press <F1> or <Shift+F1> to cycle through the possible fields you can import into in the chosen destination file.
- Alternatively, press <F2> to view a list of the available fields, use the <Up Arrow>/<Down Arrow> key to browse the list and press <F2> to select the variable.
Press <Enter> to move to the options column.
Options
You will find some variables have various letters and numbers in brackets alongside them, these are known as "options". "Options" are available when you have a choice over where the data is imported on a single variable.
When importing addresses into the Account Address File, 'LDAD', variable 18, Account Address, options 1-5 are available to define into which line of the address you want to import. |
Expression
The "Expression" is how you tell the system whereabouts in the source file it will find the required data and how it should be handled. The first part of the expression defines whether the imported data is text or numeric. 'ST' denotes that the data is to be text or a combination of text and numeric characters. 'NU' denotes that the imported data will be just numeric. It is important to specify the correct data type when importing to avoid errors - if you are unsure of what the type should be, the "Type" field will show a 'T' for text or 'N' for numeric.
The most common files you will import from are of a delimited format where each value is separated using a delimiter character. The most commonly occurring of these is a '.CSV' file.
To import text values from a '.CSV' file, the following expression will be used :
ST{1(,)} |
This example will import the text string from column 1 of the source file where ',' is the delimiter character.
To import numeric values from a '.CSV' file, the following expression will be used :
NU{2(,)} |
This example will import the numeric string from column 2 of the source file where ',' is the delimiter character.
Further Information
Do be careful to check your template before you use it. It is worth taking ten lines out of your source file, creating a separate file and using this to check that everything is going to the correct place. It can save you an awful lot of bother if your template is not quite right.
See also
- All Data Import Help
- How do I export a Data Import template?
- How do I import a Data Import template?
- Data Import Destinations
- Useful Keys