· Aug 3

CSV to XML's, preferably without coding?


Using Interoperability, I can't figure out how to create separate XML's files from a CSV-file using the GUI-features Record Maps/Complex Record Mapper -> Data Transformations. I'm familiar with reading/writing the files using File Service/Operation, but don't understand the processing-steps.
The preferred method by my colleagues is to do this without any Objectscript or Embedded Python coding, but if this can only be done by some coding that's fine as well.

See example below.
Any help is appreciated!

Kind regards,
Ties Voskamp

Example CSV:

52001;2023-02-01;"AP12345";"Pencil Black 5mm";10;5.50;1
52001;2023-02-01;"AP12350";"Pencil Red 15mm";10;7.50;2
52003;2023-03-01;"AP12345";"Pencil Black 5mm";10;5.50;5
52003;2023-03-01;"AP12350";"Pencil Red 15mm";10;7.50;5
52003;2023-03-01;"AP12346";"Pencil Blue 5mm";10;5.50;3
52003;2023-03-01;"AP12347";"Pencil Green 5mm";10;5.50;2
52014;2023-04-21;"AP12345";"Pencil Black 5mm";10;5.50;5
52014;2023-04-21;"AP12350";"Pencil Red 15mm";10;7.50;5
52014;2023-04-21;"AP12346";"Pencil Blue 5mm";10;5.50;8

I need to create separate XML-files (one per unique PONumber) with the orderlines belonging to that PONumber.
Example output: PO52001.xml

<PurchaseOrder PONumber="52001" PODate="2023-02-01">
        <ArticleName>Pencil Black 5mm</ArticleName>
        <ArticleName>Pencil Red 15mm</ArticleName>
Product version: IRIS 2023.1
Discussion (2)2
Log in or sign up to continue

When you create a RecordMapper to transform a CSV into an ObjectScript class you can add to the production a Business Process to receive the created object from the mapper, so you can transform it to XML (extending the ObjectScript class from %XML.Adaptor) and save it into a file created ad-hoc when you've received the first mapped row of the CSV (I guess that you can get from the original request the name of the original CSV file to identify the PONumber).