In reply to: Paweł Tołoczko
i use mouse recorder in loop and then in reports in step https://docs.webcon.com/docs/2023R3/Studio/Workflow/Step/Path/Step_Paths#9-available-as-quick-path
Hi Darek,
When I need to do that, I prepare a small workflow with 2 steps, field for Business Entity (+ maybe other parameter that will stay the same for 1 batch), and an item list with the colums you need on the target workflow. Make The fieldtypes in the item list the same as in the targetworkflow/-form.
Map the item list colums according to your source file for import.
Then put an "Create subworkflow (SQL)" action on the path between the 2 steps, that creates 1 workflow for every line in the target process/workflow/form. Make sure you set it to "...unrelated to current workflow instance" to avoid creating subworkflows depending on the import.
The Query you need is used to map the values from wfelementdetails table to the target fields.
This is done by using the Fieldobjects, so in my statement each field is as follows:
Select [columnobject1 from item list] as [FieldobjectX in target workflow]...
The system translates this to e.g.:
Select DETAtt1 as WFDAttText1...
DET_WFCON in the where clause is the itemList object, and of course the DET_WFDID needs to match current workflow ID.
The hard join through where clause with DET_WFDID = WFD_ID is used to get the values that are in the import workflow header, in my case the company is not in the item list, so its a field in wfelements. (you can see in query preview)
I usually run a small batch for testing to prevent you from having to delete too much if things go wrong. Testing in DEV or TEST is not a bad idea either ;)
Works like a charm for me. I have imported 700 colleagues, more than 9000 suppliers for several companies, and some other stuff.
BR
Chris