Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This blog post captures some of the process and code tips and tricks used to create a PDF template for FPN and other modules.

...

On the first page of the creation, wizard pick HTML and pick the "Load Sample HTML" option (the MS Word option will be phased out, and has been kept for a while to support last years users).

The top large text area is the "Letter Contents", this is where the main template goes into, you can identify keywords and change them in here. It may be easier to copy the text out into a better HTML text editor then paste it back in when you are done. NOTE this letter contents section is not a FULL HTML page on its own, it is 3/4 of a page.

The 2nd large text area is the "Additional CSS", this is where formatting rules are applied, such as font, font size, spacing, colours etc.

You can upload your PDF letterhead template and set the margins for the first page.  The letter head must be a single page PDF file.  Note you can set the Addressee details location to fit in a windowed envelope, this location is set irrespective of the rest of the page, to ensure it is exactly where it needs to be regardless of where other information may flow to see the information on the <address>  tag further below.

When you are done, save the record. On the next page, you can preview the merge letter. What it does is merge the current Merge Letter with the first record in the current event. So it will help to make sure that record has photos, notes and details that will test the template properly, you may need to work in a test event for this.

Listing the Merge Tokens

From the mail merge settings page, Administration→Settings→Merge Templates select any of the templates records.

...

TokenDescription
{$MERGE_DATE}The date which merge document has been generated.
{$MERGE_DATETIME}The date and time which merge document has been generated.
{$IN_TWO_WEEKS}The date 2 weeks from today.
{$IN_THREE_WEEKS}The date 3 weeks from today.
{$IN_FOUR_WEEKS}

The date 4 weeks from today.

{$due}

Displays the date in the format of: 15/08/2021

This token is also useful f you have Process Workflow Updates on Items turned off for your template. If Process Workflow Updates on Items is turned off, it will still calculate what the due date will be and it will appear in the letter even though it doesn't update the item.


*NOTE: if you use {$due} (which is the Next Action Date) any FPN records with no due date will have the default date of two or three weeks set before it prints

...

Currently there are three override fields on the FPN form which are listed below along with the tokens you need to use for these fields for them to appear in the letter:

  • Override Owner Details 
  • Override Property Number
  • Override Location

{$overrideOwnerDetails}
{$item.overridePropertyNumber}
{$item.overrideLocation}

...

The Fire Prevention Notce has a single merge token called  {$conditionsAll}
This is a shortcut that gets all of the checked items and puts them into one text list if you don't like the default options in this {$conditionsAll} variable, then it can be removed and replaced withwith about  about 40 lines that will allow you to specify exactly what you want to have on the letter
If you're not familiar with HTML, don't be scared. Just change what you want to change in between the <li> text you can change </li>
Please do not edit the ones inside the {if .... } sections.
The <li> tag defines a list item. The <li> tag is used inside  unordered lists (<ul>) will usually be displayed with bullet points.

...