
Add Job ID from Ad Ticket to hierarchy information
This is an example script that demonstrates how you can access information in a dataset of a job (in this case the 'Xmp' dataset that was created by the XMP Pickup tool) and how to add this information to the hierarchy information of a job.
Information
Supported by: PowerSWITCH (MAC and WIN)
Language: JavaScript
Description:
When a job arrives, the script accesses the XMP dataset in the job ticket and searches for the Medibel+ job ID (mbp:ediorderid). If the job doesn't contain this information, the script looks for the job ID defined in the Ghent PDF Workgroup Ad Ticket.
The script then adds the job id, or the word "unknown" if no job ID could be located, to the hierarchy information of the processed job.
The archive hierarchy tool can then be used to create a folder structure based on job IDs of incoming jobs. All jobs that contain a job ID in their metadata are dropped in folders that are named like that job ID; all jobs that didn't contain correct metadata end up in a folder called "unknown".
Using this script
- Download and save the script on your computer: download script.
- Select the script element in your PowerSWITCH flow and browse to the script in the script package property.
or - Open the script in the SWITCHscripter and change it to your needs.
Example flow
Sort jobs in folders based on Ad Ticket Job ID
This flow retrieves the XMP information from a PDF file. Folders are created based on the job ID that was found in the XMP information and all files are sorted to the folder with the matching job ID.
