Access to Document Custom Fields

Description
plonka
Posts: 22
Joined: Fri Feb 08, 2008 7:26 am

Access to Document Custom Fields

Postby plonka » Thu Jul 17, 2014 12:31 pm

Hello,

Does anyone know if I have access to the 'Document Custom Fields'? I would like to read the content of the custom fields in a 'Wiki Content' inside the document or use them in the PDF export header and footer configuration.

Thank you,
Chris

martins
Posts: 181
Joined: Thu Nov 05, 2009 3:24 pm

Re: Access to Document Custom Fields

Postby martins » Fri Jul 18, 2014 8:25 am

Code: Select all

$document.getCustomField("myCustomField")

Kind regards

Martin

plonka
Posts: 22
Joined: Fri Feb 08, 2008 7:26 am

Re: Access to Document Custom Fields

Postby plonka » Fri Jul 18, 2014 8:59 am

Thanks, that works perfectly!

Chris

ffrumento
Posts: 19
Joined: Tue May 08, 2007 8:11 am
Location: Italy

Re: Access to Document Custom Fields

Postby ffrumento » Thu Feb 12, 2015 8:21 pm

It works only for the wiki content inside the document, it does''t work inside PDF export template, any idea about how to get the document custom field value inside a PDF export template ?

plonka
Posts: 22
Joined: Fri Feb 08, 2008 7:26 am

Re: Access to Document Custom Fields

Postby plonka » Fri Feb 13, 2015 8:31 am

I use it also in the export template:

Code: Select all

<td width="40%" align="right" style=";font-size: 10pt !important;">$[documentName]<br/>$[documentCode]</td>


For comparison, in the Wiki:

Code: Select all

  <tr><td align="center" style="; font-size: 14pt;">$document.getCustomField("documentCode")</td></tr>


Christian

ffrumento
Posts: 19
Joined: Tue May 08, 2007 8:11 am
Location: Italy

Re: Access to Document Custom Fields

Postby ffrumento » Fri Feb 13, 2015 9:53 am

I was missing the different syntax, thank you very much !

ffrumento
Posts: 19
Joined: Tue May 08, 2007 8:11 am
Location: Italy

Re: Access to Document Custom Fields

Postby ffrumento » Fri Feb 13, 2015 4:15 pm

How if i need to have a empty footer for the first page ? I've tried the following script but it put the code in the PDF without running it, any advice where to look for documentation of the script language ?

#if($[page] > 1)
<html for normale page>
#else
<nothing>
#end

smarty
Posts: 54
Joined: Fri Jan 18, 2013 4:43 pm
Location: Germany / Frankfurt
Contact:

Re: Access to Document Custom Fields

Postby smarty » Wed Feb 18, 2015 5:20 pm

The vocabulary of the Polarion export templates (cf. /polarion/#/project/drivepilot/administration/workitems/exporttemplates)
for formatting the output to PDF is XSL-FO as in W3C's Extensible Stylesheet Language Formatting Objects,
not Velocity macro syntax.

FAQs or tutorials I know of:
XSL-FO FAQ by David Pawson
XSL-FO Usage Sams Teach Yourself XML in 21 Days | InformIT

In order to have a different footer on the first page you would need to create a seperate title page
My environment: Polarion ALM 2016 SR2 on Windows Server 2012,
Polarion-JIRA Connector to JIRA 7.x

ffrumento
Posts: 19
Joined: Tue May 08, 2007 8:11 am
Location: Italy

Re: Access to Document Custom Fields

Postby ffrumento » Wed Feb 18, 2015 6:34 pm

Thank you very much for the reply, I'll study it, i thought the learning curve seems steep :(

pitzalis
Posts: 15
Joined: Mon Jun 04, 2007 8:58 am
Location: Italy

Re: Access to Document Custom Fields

Postby pitzalis » Thu Feb 19, 2015 9:47 pm

In order to have a different PDF first page header and footer, I use these PD4ML tags in my wiki page:

Code: Select all

{show:pdf}
{pre}
<pd4ml:page.header scope='1'> First page HTML header </pd4ml:page.header>
<pd4ml:page.footer scope='1'> First page HTML footer </pd4ml:page.footer>
{/pre}
{show}

Hope this helps.

Bye,
GP

smarty
Posts: 54
Joined: Fri Jan 18, 2013 4:43 pm
Location: Germany / Frankfurt
Contact:

Re: Access to Document Custom Fields

Postby smarty » Fri Feb 20, 2015 5:07 pm

pitzalis wrote:In order to have a different PDF first page header and footer, I use these PD4ML tags in my wiki page...

That's interesting. Is it an extension for Polarion?

Regards, Martin
My environment: Polarion ALM 2016 SR2 on Windows Server 2012,
Polarion-JIRA Connector to JIRA 7.x

pitzalis
Posts: 15
Joined: Mon Jun 04, 2007 8:58 am
Location: Italy

Re: Access to Document Custom Fields

Postby pitzalis » Fri Feb 20, 2015 8:30 pm

PD4ML (http://pd4ml.com/) is the engine that Polarion use for Wiki/Document PDF export.


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: Brantpync, Google [Bot] and 10 guests