Parser setup

Arne Kroka Updated by Arne Kroka

Navigate to Cepheo® > Tools > Setup > Parser setup in the Modules menu.

Setup

The Parser setup forms allows you to configure how to processes and interprets incoming data. Here you can establish the parsing rules that determine how information is extracted and processed from various data sources.

Field
Description

Entity type

Select the target for the import.

  • Ledger import: Used for importing ledger transactions
  • Product price import transactions: Used for importing product prices

Data format

Select the file format used in the import file

  • XML: Not currently supported.
  • JSON: Not currently supported.
  • Fixed position: Text files with fixed positions for the fields
  • CSV with tabulator: CSV files with tabulator as separator
  • CSV (Large files): Better performance for large CSV files
  • Text files (Large files): Better performance for large Text files

File extension

The file type

Encoding

Select the encoding for the file. Default is UTF-8.

These encodings are currently supported:

  • UTF-8
  • UTF-7
  • ASCII
  • ANSI 865 (Nordic)
  • ANSI 1252 (Latin 1 / Western European)

Code page

Select the code page for the file.

The Code page are only used when encoding ASCII is selected

Parent parser rule

Use the Parent parser rule if lines in a file must be imported differently.

Parent parser rule are always run before the child rule
Parent parser rules do not run its children parser rules. It is the Child parser rule that calls it parent.

Quote char

Select the Quote char for fields in the file

  • None: Use None if Quote chars is not used to wrap around values in the file.
  • Double quotes ("): Use Double quotes if it is used to wrap around values in the file.

Field separator

Select the field separator

The field separator Is only used if Data format is CSV (Large files) or Text files (Large files)

Fixed position fill char

Select the fixed position fill char

The Fixed position fill char is only used if Data format is Fixed position.

Number of header lines

Select the number of header lines to be skipped

Max number of lines

Set the maximum number of lines to be read

Field setup

Define the file field setup

Field
Description

Field name

The target field

Position

The position of the field in the file

Field format

Set the field format.

Field format is only used for Field types: Date, Decimal (delimiter), Decimal (fixed numer of decimal places) and Boolean.

Field type: Date

Set the date format used in the file. Use Y for year, M for months and d for day.

Example: The date 31-12-2024 has the format DD-MM-YYYY

Field type: Decimal (delimiter)

Set the delimiter in the format field.

Examples:

The number 12345,67 has format comma (,)

The number 12 345,67 has format comma (,)

The number 12345.67 has format dot (.)

Field type: Decimal (fixed numer of decimal places)

Set the number of decimals used in the number.

Example: The number 1234567 does not have a delimiter but it has a fixed number of two (2) decimal places. Set the number 2 in the format and the value will be formatted to 12345,67

Field type: Boolean

Set the value used for true.

Examples:

If the value can be NO or YES; Set YES in the field format.

If the value can be 0 or 1; Set 1 in the field format.

Field length

Set the length of the field

The Field length is only used if Data format is Fixed position.

Field type

Select the field type of the field

  • Text
  • Date
  • Integer
  • Decimal (delimiter)
  • Decimal (fixed numer of decimal places)
  • Boolean

Validation values

Set the validation rules for the field. Separate the values with semicolon (;) if more than one value are valid

Calculated fields

Calculated fields are used for calculating text and number fields.

Example 1: Numbers

In a Ledger import you want to calculate the field AmountMST based on the values in the fields Amount and ExchangeRate.

Amount and ExchangeRate are already setup in the Field Setup.

  1. Add a new Calculated field and select the field AmountMST in field name
  2. Click Save
  3. Click on the button Calculation
  4. In the Calculation dialog create these lines
  1. Click OK to save the calculation

Example 2: Text

In a Ledger import you want to calculate the field Text based on the value in the fields BusinessArea and Element01.

You also want to add a prefix (USMF-) and a dash(-) between BusinessArea and Element01.

BusinessArea and Element01 are already setup in the Field Setup.

  1. Add a new Calculated field and select the Text in field name
  2. Click Save
  3. Click on the button Calculation
  4. In the Calculation dialog create these lines
  5. Click OK to save the calculation

How did we do?

Journal Imports (Global)

Contact