Page 1 of 1

Essential question: how use setDataset for my metadata

Posted: Mon Feb 18, 2013 11:03 am
by freddyp
There is a function job.getVariableAsString( variablestring);



In your case the variable string will be:

[Metadata.Text:Path="/field-list/field[tag='SomeVar']/value",Dataset="Metadata",Model="XML"]



Freddy

Essential question: how use setDataset for my metadata

Posted: Tue Feb 19, 2013 3:16 pm
by freddyp
I do not understand what you are trying to do. If the user entered NoQwerty in the metadata of the submit point, you want to add a field of which the value is qwerty?



Consider working with dependent metadata. Dependent metadata is what you get when you add a field under another one and you move it over to the right with the arrow (to the right of + -) just like you would indent lists in Word or Powerpoint. You can then set what the dependent metadata should depend on. And if you do not want the user to see a certain field then hide it by setting "Display metadata field" to no.



I have a strong impression you are trying to use a script where it is not necessary. Try it out. Perhaps it is a solution for your problem.



If it is not, then please provide a more detailed explanation of the real case.



Freddy

Essential question: how use setDataset for my metadata

Posted: Wed Feb 20, 2013 10:43 am
by freddyp
Now I understand.



There are two other solutions that are a lot easier to do than adding the information to the dataset.



The easiest one, because it does not require any scripting is to put the file name of the imposition template in the job state. It is one of the properties of a folder. In the line where you select the imposition template you can use the variable [Job.JobState]. The disadvantage of this method is that there is only piece of information you can store in the job state. So if you need more, go for the next solution.



A job can have private data, any number of it. You set it in a script or a script expression with



job.setPrivateData("template","4mm_PerfectBound_Duplex");



In the line where you choose the template you use the variable [Job.PrivateData:Key=template]



Freddy