Parametrics can be very useful in Document Publisher. It uses a question mark ? as a marker to Document Publisher that this is an option and needs to be filled/selected by the user.
It can allow users to set the Identity/key of a single item or more to be output. This can be used in a hierarchy or with a single item type. Parametrics can also be used to set different properties and options in filters.
Single Parametrics
Using a single Parametric (?) allows a user to publish a template many times but use a different item Identity or Key each time. Note: Using a single parametric in several places in the template will always use the same item identity or key each time.
A parametric can be used at the database/top level or at the field level to set the items to be published. At the top level the parametric is entered for the Identity or Key.
They can also be used in a filter for field to set or restrict the items to be output.
In this case the Requirement attribute of Identity will only be output if its Item Status is set to Accepted.
As you can see below, only items with a status of Accepted have both the Identity and Key output for the Requirements.
Named Parametrics
Using a Named Parametric (?named) means a user can have several different parametrics throughout the template and each can be set at time of publishing. So for example the user can set one named parametric for output based on one option of category (e.g. Agreed) and then later in the template use a different named parametric to output based on a different category option (e.g. Rejected).
During publishing a popup will allow the user to select Agreed for the first Paragraph Group popup:
They then can select Rejected for the second Paragraph Group popup:
The published output will then show the 2 different outputs in the same document.
These named parameters can even be used in several places within the template. The user may want to show the Agreed Requirements and System Requirements in one document. As both item types use the same category (Item Status in our Demo) then the same named parametric can be used for both item types.
In the above screenshot, the 2 named Parametrics have been used for Requirements and System Requirements and the output shows all the Agreed items but that there are no Rejected System Requirements.