Hi all,
When I submit a job folder, it has a csv file which will have a different number of rows for each submission. The number of rows determines how many files will be generated.
Down the line I need to assemble those files back into a folder.
I'm using a custom scheme. Job identifier is set to [Job.IsFile], and then the Number of files property needs an entry.
My attempt at a solution is to convert the original csv to a text file by simply renaming the file, then I use the "CountRows" element to count the rows. This adds a Private Data Key of "RowCount", which I would then submit to Assemble Jobs as the Number of files.
[Job.PrivateData:Key="RowCount"]
However, the csv has a header row in it, which increases the number of rows by 1, making the actual job count 1 too high. To account for that, I used a Calculation to remove 1 from the RowCount:
[Switch.Calculation:Expression="[Job.PrivateData:Key="RowCount"]-1"]
It returns the correct number, but this doesn't work in the Number of files field.
When I say "doesn't work", I mean that when I use the calculation, it does not actually assemble the jobs. For example if I have 10 files, it will simply push those 10 files on to the output folder and not assemble them into a folder.
If I type "10" into the Number of files field inline then it works as expected, correctly combining those 10 files into a new job folder.
What are my options for grabbing that number dynamically in a way Assemble Job doesn't object to?
Assemble Jobs calculations problem
Assemble Jobs calculations problem
- Attachments
-
- assemble jobs image.png (81.3 KiB) Viewed 12944 times
Re: Assemble Jobs calculations problem
I would try with another job identifier.
I don't think a Boolean is accepted here.
I don't think a Boolean is accepted here.
Laurent De Wilde, Solution Architect @ Enfocus
- PrepressNinja
- Newbie
- Posts: 8
- Joined: Fri Feb 16, 2018 5:46 pm
Re: Assemble Jobs calculations problem
Hi, I think laurentd nailed it. I built a quick flow to match your problem and the only difference is assembling by Job.Name instead of Job.IsFile, and it assembles instantly. Let us know if this helps!
▬▬ι═══════ﺤ
Re: Assemble Jobs calculations problem
That is the correct way I'd do it but I typically use Job.NameProper so it doesn't include the file extension. Personal preference.PrepressNinja wrote: ↑Fri Aug 16, 2024 5:01 pm Hi, I think laurentd nailed it. I built a quick flow to match your problem and the only difference is assembling by Job.Name instead of Job.IsFile, and it assembles instantly. Let us know if this helps!
I also use the app called 'List Magic' that takes each row and outputs it as a txt file and all the header rows are set as priavate data so if you are using them to inject art or process in another manor all the data by row is there and set as privatedata that can be used.
I use this a lot to our store resets where I inject art that is in a repository and each header contains information such as size, stock, quantity, etc so they can be grouped for production or when I need to build store sets for our toner printers where I duplicate the file based on the QTY column using Job repeater and then assemble all the files into one large pdf that is built from many of the txt files so the print operator only has to print 'sets' vs setting qty of each art version and then possible having to hand collate downstream
Color Science & Workflow Automation