Hi,
I don't really understand what you want to achieve.
- You get x invoices , number, vendor, date
- Each invoice has y lines, article, price quantity
Do you have one process with two item list, one for the invoice and one for the invoice lines or do you want to create one workflow instance for each invoice and populate an item list with the invoice lines?
Without knowing the whole use case, I would assume that the later would be better, for any kind of approval workflow or similar.
Even if I'm wrong and you want to populate two item lists in one workflow instance, I don't see the issue. I would:
- Retrieve all invoices
- Foreach invoice
-- Add a row to the first item list
-- Fetch the invoice lines
-- Add rows to the second item list with the invoice lines and add a column to store the the invoice number as a reference.
I created an SDK action some years ago to populate an item list from an XML file. Maybe this could be a good starting point for you.
Code:
https://github.com/Daniel-Krueger/webcon_xmlToItemList/blob/main/CC_XmlToItemList/XMLtoItemList.cs
Blog post
https://daniels-notes.de/posts/2021/custom-action-xml-to-item-list
Best regards,
Daniel