Formatting codes
Merge codes are placeholders for text, data, or images that are either entered or selected manually in the Data Entry screen or brought in automatically from a Customer Relationship Management (CRM) application, such as Salesforce, when you build a document. Formatting codes can be used in addition to and in conjunction with merge codes to modify the appearance of content. In Upland Qvidian, formatting codes are enclosed within double curly brackets {{ }}, while merge codes are enclosed in double angled brackets<<>>. Like a merge code, a formatting codes can be added to a Word document by typing it directly into the document or clicking the Insert Field button on the Qvidian toolbar and selecting the code.
Format long and short dates
You can use formatting codes to change how a date is formatted in your document. In the example below, the formatting codes modify the CallDate merge code. If the user enters the date January 31, 2013 in the Data Entry screen when they build a document, the results will be as follows:
Format | Result |
---|---|
{{DateLong}}<<CallDate>>{{DateLong}} |
Friday, January 01, 2013 |
{{DateShort}} <<CallDate>>{{DateShort}} |
1/1/2013 |
DeleteParagraphIfEmpty
The DeleteParagraphIfEmpty formatting code deletes entire paragraphs when there is no text created by the merge code. This code is commonly used with the Address2 merge code, which holds a place for the second line of an address.
The example below shows how the output is affected by the DeleteParagraphIfEmpty formatting code.
Format | Result without text in the Address2 field | Result with text in the Address2 field |
---|---|---|
<<client>> <<clientAddress1>> {{DeleteParagraphIfEmpty}}<<clientAddress2>>{{DeleteParagraphIfEmpty}} <<clientCityStZp> |
Qvidian 10101 Alliance Road Cincinnati, OH 45242 |
Qvidian 10101 Alliance Road Suite 320 Cincinnati, OH 45242 |
<<client>> <<clientAddress1>> <<clientAddress2>> <<clientCityStZp> |
Qvidian 10101 Alliance Road
Cincinnati, OH 45242 |
Qvidian 10101 Alliance Road Suite 320 Cincinnati, OH 45242 |
Note: You must also select the Hide Empty Custom Fields option when you build the package to hide the empty paragraphs created by the DeleteParagraphIfEmpty formatting code. For more information, see Build a Package.
FitToShape
The {{FitToShape}} formatting code can be used in PowerPoint locations where you want the inserted graphic to fit to a shape. It can only be used with graphic merge codes in PowerPoint, and the graphic merge code and formatting codes should be the only text in the shape. Without the {{FitToShape}} formatting code the image will populate the shape in its original size. The following screenshots show the upland University logo, using the merge code with and without the {{FitToShape}} formatting code.
LinkToPrevious
The {{LinkToPrevious}} formatting code applies the header or footer of a document to the pages prior to it in the build. Enter the code in the header or footer in the Section break section of your document type. For example, if you are adding a new section break in which only the page margins or orientation change, you can use this code to avoid reentering the header and footer information in the new section break.
{{Link}} formatting code
{{Link}} formatting codes are supported for all Word content that is built in a Project. If a content manager wanted to insert the merge code, <<HelpURL>>
, to populate a unique online help center URL into each project build, there are several ways they could use the {{Link}}
formatting code to produce a clickable hyperlink in their built Word document:
Format | Description | Result |
---|---|---|
{{Link}}<<HelpURL>>{{Link}}
|
To format the value of a merge code as a link, surround the merge code with the {{Link}} formatting code. | https://help.uplandsoftware.com/qvidian/Home.htm ....if “https://help.uplandsoftware.com/qvidian/Home.htm” was entered as the <<HelpURL>> on the data entry screen. |
{{Link}}Click Here!|<<HelpURL>>{{Link}}
|
To include a fixed alternative display text for the link, enter that text before the merge code, and separate them with a vertical bar. | Click Here!... if “https://help.uplandsoftware.com/qvidian/Home.htm” was entered as the <<HelpURL>> on the data entry screen. |
{{Link}}<<DisplayText>>|<<HelpURL>>{{Link}}
|
To include an alternative display text for the link, enter a merge code for the text and the desired merge code link, and separate them with a vertical bar. | DisplayText...depending on what was entered as the merge code display text and if “https://help.uplandsoftware.com/qvidian/Home.htm” was entered as the <<HelpURL>> on the data entry screen. |