Topic Options
#56935 - 04/07/19 05:02 PM Dividing Metadata selection
Martijn Offline
OL Newbie

Registered: 01/21/18
Posts: 21
Good morning

Hoping someone can help with this as no matter what it try i cant get this to work.

Is there any way to divide the following value in the metadata data field by two and round up if its an odd number?

=GetMeta('SelectedCount[0]', 1, 'Job.Group.Document')
_________________________
Martijn

Top
#56938 - 04/08/19 02:27 PM Re: Dividing Metadata selection [Re: Martijn]
Philippe F. Online   content
OL Expert

Registered: 09/06/00
Posts: 1926
Loc: Objectif Lune, Montreal, Qc
Your metadata expression is incorrect: Groups and Documents are arrays, therefore you must specify an index for each.

I am assuming you want to convert the number of pages into a number of sheets. Here's a Workflow script that stores in JobInfo9 the result of that conversion for the first document:
Code:
var pages = Watch.ExpandString("GetMeta(SelectedCount[0], 11, Job.Group[0].Document[1])");
Watch.SetJobInfo(9,parseInt(pages/2)+(pages%2));




Edited by Philippe F. (04/08/19 02:28 PM)
_________________________
Technical Product Manager
I don't want to achieve immortality through my work; I want to achieve immortality through not dying - Woody Allen

Top
#56940 - 04/08/19 05:44 PM Re: Dividing Metadata selection [Re: Philippe F.]
Martijn Offline
OL Newbie

Registered: 01/21/18
Posts: 21
Hi Philipple

you are correct in staying i want to convert the number of pages into sheets but i am trying to achieve this in PP Design when defining metadata. Also rounding the total sheets up if its an odd number of sheets.

Is this possible through PP design using PP Talk?
_________________________
Martijn

Top