IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#30392 - 09/24/09 04:23 PM Set Job Info
Jessica Offline
OL User

Registered: 05/08/09
Posts: 63
Hi,

I would like to somehow populate a job info with a variable I set in my document through PP Talk and am having trouble.

The variable is a form number that I want to use in my workflow through text conditions, etc. Can I somehow get this variable result in a job info? Though metadata, perhaps?

I've not used metadata fields yet, so I'm unfamiliar with how this works. I did manage to create a metadata field using the variable I want populated in the job info. I simply gave it a name, Level (I'm not sure what to choose) and the value is my variable.

Help! If further explanation is required, please let me know.

Top
#30393 - 09/24/09 05:07 PM Re: Set Job Info
Anonymous
Unregistered


Hi,

As I understand, the workflow tool's set job infos and variables plugin can be used to do this, without relying on the design tool. You will first need to associate a sample datafile with your process.

Here is a step-by-step guide to help you a) select a sample datafile for use in the workflow tool, and b) use the selected datafile to initialize a job information.

1. Open your workflow tool configuration and select your process.

2. Click on the 'Debug' ribbon and choose the 'select' button. A Data selector window will appear.

3. Choose the sample data file used with your PlanetPress design document and set up the emulation accordingly. Click ok. You will notice that some debug options like Run, Step, Skip, etc. become available.

4. In the proces for which you just selected a sample data file, insert a 'set job infos and variables' plugin. This will open the plugin's properties window.

5. On the Var/Info#, choose the job info you want (e.g. %9).

6. Click on the corresponding Value column (right side) to make the field editable.

7. Right click inside the Value field and choose 'Select data'. The data selector window will open, showing the datafile you have previously chosen.

8. Select the data you want, then click ok. The value of the job info will then appear as an expression.

9. Click ok to close the Set variables and job infos plugin properties. The chosen job info will now be initialized with data coming from the input file.

10. You can now add a condition below and perform any test you want on the value contained in the Job info.


Hope this helps!

Benoit

Top
#30394 - 09/24/09 05:24 PM Re: Set Job Info
Jessica Offline
OL User

Registered: 05/08/09
Posts: 63
Unfortunately, I cannot simply use the data file. I am setting this variable based on information in that data file, but it is not directly in the data file... Let me explain.

In my form, through a series of if statements based on this data, I set my variable say "FormNum". So, my talk syntax looks like this:

if(&ClientCode='c119')
if(&ProductType='Supplement')
if((&IssueState='AZ')or(&IssueState='TX'))
set(&FormNum,'SM MMA'+&IssueState)
elseif
set(&FormNum,'SM MMA GENERAL')
endif
endif
endif

This is just a small example.

So, essentially, I want my variable "FormNum" in the job info so I can use it dynamically in the workflow. The resulting FormNum drives what the workflow needs to do. (i.e. what other documents to grab, etc.)

Any assistance is greatly appreciated!!

Top
#30395 - 09/25/09 08:35 AM Re: Set Job Info
Gerald Offline
Member

Registered: 07/24/08
Posts: 74
Loc: Italia - France
Hi Jessica

If the way is to pass data from Workflow to Design :

Go to the "Job infos" properties of your Design Document (Layout), use the %9

You can use this variable in talk with :
Code:
&watch.Jobinfos[9]
Always in "PressTalk Before" of the Layout properties, you use this method to set the global variable :
Code:
if(&watch.Jobinfos[9]<>'')
 myglobalvar:=&watch.Jobinfos[9]
else
 myglobalvar:='default'
endif
When you use the var %9 in your workflow, Design PP image take the variable setting by "Set variables and job infos plugin properties"

I use this method to select which form format the project must use in output (A4/A3-2UP...)


If the way is to take an info variable from Design to Workflow...


Is more complicated I think. Perhaps to use Digital imaging and not PP image plugin ...

Gerald.

PS: you can set watch variable with a script plugin in the workflow.

Top
#30396 - 09/25/09 10:20 AM Re: Set Job Info
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
Jessica,

If I understand correctly, you want to pass a variable from Design to a Watch job info, is that correct?

The best method is probably to use metadata. In your presstalk, add this line:

if(&ClientCode='c119')
if(&ProductType='Supplement')
if((&IssueState='AZ')or(&IssueState='TX'))
set(&FormNum,'SM MMA'+&IssueState)
elseif
set(&FormNum,'SM MMA GENERAL')
endif
endif
endif
definemeta('FormNumValue', &FormNum)

This creates a metadata tag called "FormNumValue" that contains the value of FormNum.

Then, in Watch, you will use a Create Metadata action, and call your form. This will create metadata for your form. Then, follow it by a Run Script, and use this script:
Code:
dim oMeta
dim MetaJob

Set oMeta = CreateObject("MetadataLib.MetaFile")
oMeta.LoadFromFile(Watch.GetMetaDataFileName)
Set MetaJob = oMeta.Job()

Watch.SetJobInfo 9, MetaJob.Group(0).Document(0).Datapage(0).Page(0).FieldByName("FormNumValue")
This will put the value of FormNumValue in job info 9, and you can now use it wherever you want in your Watch process.

Hope that helps.

Regards,
Rapha

Top
#30397 - 09/25/09 10:21 AM Re: Set Job Info
Anonymous
Unregistered



Top