Assemble Jobs calculations problem

Post Reply
wwstudios
Newbie
Posts: 18
Joined: Tue Mar 12, 2024 7:29 pm

Assemble Jobs calculations problem

Post by wwstudios »

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?
Attachments
assemble jobs image.png
assemble jobs image.png (81.3 KiB) Viewed 12944 times
laurentd
Member
Posts: 156
Joined: Wed Mar 13, 2019 2:06 pm

Re: Assemble Jobs calculations problem

Post by laurentd »

I would try with another job identifier.
I don't think a Boolean is accepted here.
Laurent De Wilde, Solution Architect @ Enfocus
User avatar
PrepressNinja
Newbie
Posts: 8
Joined: Fri Feb 16, 2018 5:46 pm

Re: Assemble Jobs calculations problem

Post by PrepressNinja »

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!
▬▬ι═══════ﺤ
rhd_ole
Member
Posts: 149
Joined: Mon Jan 24, 2022 5:36 pm

Re: Assemble Jobs calculations problem

Post by rhd_ole »

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!
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.

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
Post Reply