freddyp wrote: ↑Thu Jan 26, 2023 7:40 am
If you use "Scheme - Custom" in "Assemble job" you have to make sure that all files have the same "Job identifier" and for "Number of files" you can use Ungroup.NumFiles+1. I am sure there is some piece of information that is present for all the files involved that is identical and that can serve as the variable for "Job identifier".
I tried a custom scheme using Ungroup and a version where I made my own private data (num_of_files=Job.FileCount)-
The Job identifier i'm using is 'product_id', that is the common private data on all the files.
The issue is the xml that comes in to Switch from our MIS, will never have the same 'Ungroup.NumFiles' as the submitted ones.
Example:
2 files submitted ( switch calculation Ungroup.NumFiles +1 ) = 3
1 XML File from MIS ( switch calculation Ungroup.NumFiles +1 ) = 2
Custom Assemble Scheme:
Job Identifier = 'product_id'
Number of files = switch calculation Ungroup.NumFiles +1
The result is the XML completes, since 1+1 is true, and leaves the submitted files, 2+1 is false and fails since there are only 2 files there.
I also tried the same thing but without an ungroup from the XML which makes the XML not have any private data for Ungroup.NumFile and the same thing happens except. I then tried to come up with a complete condition but failed there as well.
I've attached a sample flow in case this would help or anyone wanted to take a look( one using ungroup one using custom assemble) and 3 sample files (2 excel for the submitted files, and one XML for the file that comes out of the MIS. I set product_id private data as common from both input
- Flow Screenshot
- Screenshot 2023-01-26 at 6.27.43 AM copy.jpg (169.69 KiB) Viewed 4412 times