I have one text file with multiple purchase orders. Each purchase order has item detail.
I have created a data model with 2 extraction steps (and a repeat step) that will separate the text file by purchase order and item detail.
I need to export the text file to separate CSV files. So if there are 3 purchase orders within the text file, I need 3 separate CSV files.
The 2 extraction steps have created 2 data tables named “record” and “record.itemdetail”.
What I don’t know is how to combine the data table “record” and the data table “record.itemdetail” as one record line within the CSV file.
I believe I can accomplish through Javascript but not sure of how to loop correctly.
For example:
Import - TEXT FILE
PO Header
PO#: 12345
Ven#: A9999
Address: 123 Twig St
PO Detail
Item#: 77777
Description: Box of Cereal
Qty: 5
Export - CSV FILE (What I would like the output to look like below)
Take a look at this post, which explains how to write a csv from a post-processor step in the DataMapper. You can search for other post-processor information on this forum using the search function at the top of the page.
Thank you Phil. I have the javascript in place and the datamapper uploaded to the workflow. Could you point me in the direction of how to process the file from workflow? I am also new to the Connect plugins and not sure how to setup the workflow process.