NF9.1 Import Format Enhancements
Feature: Import Format Enhancements
Goal: Functional
Developer: Lukas Heidbreder
Feature Ticket: IDEMPIERE-4724
Description: Some enhancements for import formats
Sponsor : Martin Schönbeck Beratungen GmbH
Usage
This feature allows to combine fields from an import file to generate a single field in an import table. This is done by simply entering the same target field more than one time. But it will work only for strings or constant value. Of course when concatenating two fields (example "X47 IP-Phone" and "capable of handling seven calls at once") to form an entry, you must insert something between those to fields, typically a blank. That's the reason for the second change: a field 'import prefix' which is prepended when importing only when there is a value in the source field itself. So there is no blank appended to the first source field if the second one is empty.
Of course you can use this feature to prepend or append a constant value to a field using 'constant' entries, e.g. using a vendors product number as value for a product but prepending it with an abbreviation for the vendors name to differentiate those product value from others.
Second enhencement is to allow parameters to the callouts and to enter more than one callout for one input. The format to allow this is a simplified typical parameter layout, e.g. myCallout.replace(Meter,m,Piece,each,Bundle,set). The parameter are separated by commas and interpreted as text. They will be given as an array of strings to the callout method. It's up to your method to interpret these strings, e.g. to substitute \t with tabs or \c with a comma (because you can't enter it immediately). To enter a second or third callout you simply separate them by a semicolon.
Shortly we will provide a plugin containing some useful callouts for imports. It will be mentioned here as soon as published.