How to Use Document Template Editor

Introduction

You can use the Document Template Editor to create a new template (either in the FieldFX Admin Tools or in ServiceMax DataGuide) or open an existing template.

To use the Document Template Editor in ServiceMax DataGuide, you must have the ServiceMax DataGuide package installed in your org.

In ServiceMax DataGuide, you must be an Admin to use the Document Template Editor.

You can use repeating headers/footers, pagination, and many other advanced formatting options. You can drag design elements to the design canvas and build your document template.

You can set up a custom button to convert a report HTML to a PDF.

With the Document Template Editor, you can:

Step-by-Step Guides

How to Access

You can access the Document Template Editor from:

FieldFX AdminTools portal dashboard ServiceMAX DataGuide in FieldFX Back Office
  1. Access the Admin Portal from

  2. Click Document Template Editor under Miscellaneous.

    Admin Portal Misc category

    The Document Template Editor opens.

  1. Log into FieldFX Back Office.

  2. Switch to the Lightning Experience.

  3. Access ServiceMAX Dataguide package.

  4. Click ServiceMAX Document Template.

    If in ServiceMax DataGuide and you have existing report templates, they are stored as Attachments in Salesforce. Attachments are being deprecated and Files are preferred. ServiceMax DataGuide can automatically migrate the attachments to files if you choose. Your attachments aren’t deleted, but renamed as "archived."

    You can either click Skip for now to continue to the editor or Migrate to start the migration process.

Import the XML of an External Template

With the Document Template Editor, you can also import the XML code of a template.

Use this if the template wasn’t created in the editor. If the template was created outside the editor, use the built-in XML editor.

Create a New Template

  1. At the main screen, click + New Template.

  2. At the Start a new document window, click Blank and then click Create Template.

  3. With a blank template, complete these in order:

Define the Template Name and Type

  1. At the window under Report Name, enter the name of the report.

    • If you have created other templates, their names appear in a tooltip.

    • If you selected DataGuide as the template type, you can select the name of the DataGuide form in Form dropdown and also the Form Version.

  2. To select the Object type, use the dropdown.

    The object types shown depend on what permissions the currently logged in user has and what other FieldFX modules the user can use.
  3. Click Finish.

  4. A blank report template appears.
    With the blank report canvas, you can start dragging over elements to populate the Report Canvas.

Define the Layout Information

In the Layout Properties, you can:

  • Select the default Page Font

  • Set Paper Size

  • Set Page Orientation

  • Establish a watermark

  • Include a Header or Footer

  • Set the margins

To set the layout information,

  1. Expand the Layout Information panel.

  2. Use the Default Page Font dropdown to set the default page font.

  3. Use the Paper Size dropdown to set the page size for the report.

  4. Use the Page Orientation dropdown to choose either Portrait or Landscape.

  5. Under Watermark, click Add watermark image.
    This begins the process of setting a watermark image for the report.

    The watermark image only appears when you print or preview the report.
  6. Use the checkboxes under Include to add the Header or Footer.

    To further define the header or footer, see Change the Header or Footer.

  7. Set the Margins by using the dropdowns for Top, Bottom, Left, and Right.

Change the Header or Footer

  1. In the Report canvas, click the gear icon in either the header or footer.

  2. In the Header Properties or Footer Properties,

    Header Properties

    Footer Properties

    1. Toggle the Auto Calculate Height slider.

      This will auto calculate the height of the header or footer depending on the contents.

    2. For the header, set the Space Below by using the dropdown to set the measurement in inches.

      • You can select 0 inches, or 1/4 inch increments up to 1 inch

    3. For the footer, set the Space Above by using the dropdown to set the measurement in inches.

      • You can select 0 inches, or 1/4 inch increments up to 1 inch

  3. Click X to exit the window.

Define the File Properties

  1. Click the arrow to expand the File Properties window,

  2. Enter the title of the report in Title.

  3. The editor automatically fills in the Author field with the Current User > UserName Data Element. You can also add other text or Data Elements.

  4. Enter a subject or description for the report in Subject/Description.

  5. Enter keywords in Keywords.

    1. Enter each keyword and press Enter to advance to the next line.

      Use a separate line for each Keyword.

  6. Click Apply.

Use Advanced Filtering

You can set up advanced filters for the template. Clear the filter to show all the child records. For the filter to work, there should be more than one SObject in the data table.

Adding multiple conditions, multiple groups, and multiple conditions in a filter group within a filter could affect report template performance.
  1. Click the Advanced Filtering tab.

  2. Define the first field by clicking in the box marked 1.. You can use the search icon to search for a field.

    1. Select the object type and then the record type.

      The options in the dropdown menu may be different depending on the object chosen.
    2. Select the Operator for the filter.

      Operator Purpose

      is null

      Shows results that has

      is blank

      Shows results where the Field is blank.

      is not blank

      Shows results where the Field isn’t blank.

      is not null

      Shows results that only has numbers in the Field.

      contains

      The results only contain what is in the Value column.

      Select the object type and then select the sub object (which is based on the chosen object).

      doesn’t contain

      The results ignore what is in the Value column.

      Select the object type and then select the sub object (which is based on the chosen object).

      starts with

      Shows results from the Value column.

      Select the object type and then select the sub object (which is based on the chosen object).

    3. Enter the Value for the filter.

      You can’t use this field with all operators.

      Depending on the value in Field, the Value could be a choice of an object and sub-object.

    4. Repeat these steps to add more conditions.

    5. In Filter Logic, define the order of the conditions.

      If there is only one filter condition, that number appears in Filter Logic.

  3. To finish, click Save.

Design the Template

When you design a template, you can:

Add an Image

You can use images in your report template.

The Document Template Editor supports these image formats:

  • JPEG / JPG

  • PNG

  1. Click and drag the desired image in Image panel onto the Report Canvas (either in the header, body, or footer areas).

    You can also drag the desired image to a Layout Table cell.. Position the image element anywhere.

    Use the Image move handle to reposition the image anywhere on the Report Canvas.

    Only a single image can be added in an image placeholder element.

  2. If the image isn’t shown in the panel,

    1. Click Add new image icon to open the default location for your images.

    2. Navigate to the image location.

    3. Click Open.
      A thumbnail of the image appears in the Image panel.

    4. Click and drag that image to the Report Canvas.

  3. To change the image size, click on the pencil icon.

    • At the Edit Image window, use the up and down buttons for either Width(inches) or Height(inches).

      Changing one dimension automatically changes the other to keep the image proportional.
    • Click Save.

  4. To remove the image, click Trashcan icon icon in the corner of the image.

Add Text

You can add text to any section of the Report Canvas by clicking where you want the text to appear. While in a text element, you can format the text and change:

  • Font name

  • Font Size

  • Bold, Italic, Underline

  • Left, Center, Right Alignment

Text formatting bar

The functionality is like working in a document editor like Microsoft Word.

  1. Start typing in the canvas.

  2. To change the font, font size, apply formatting, or alignment, highlight the text first and then apply them.

Insert a Data Element

Use the </> Insert button to insert a data element into the template.

Depending on what you had selected as the base object for the template, the available fields for use will be different.

The Editor has organized each field into categories.

For more information on objects in FieldFX, see Field FX objects.

Set a Language for Automatic Report Translation

The Document Template Editor supports these languages:

  • English (default)

  • Bahasa (Indonesian)

  • Chinese

  • Dutch

  • French

  • German

  • Hungarian

  • Italian

  • Hindi

  • Japanese

  • Korean

  • Norwegian

  • Portuguese

  • Russian

  • Slovakian

  • Spanish

  • Thai

  • Vietnamese

The preview shows the template in selected language. You can add multiple languages to the template.

This is a shared component between FieldFX back office and FX mobile so they both use the same character library.
Set the Locale Settings for a Language

When you select another language, you can set the locale format for that language. The default Date, Long Date, and Time formats appear. You can change these to suit your preferences.

Set Locale Settings

You can also set the Number: Thousands Separator by Commas, Point, or Space.

Add and Configure a Data Table

After you have added a data table to the report canvas, you can configure the table to suit the data.

  1. Drag the Data Table element to the Report Canvas.
    A 1 column by 2 rows table appears.
    You can have more than one Data Table in a report. For example. you can have multiple ticket item data tables on a report, each filtered by a different record type (equipment, labor, among others.)

  2. At the Select Relationship panel that appears, click in the Relationship drop-down and select only objects having a look up or master-to-detail relationship to the report template’s object.

    Depending on the template you created and linked to a FieldFX object, the available for use.
  3. Enter in the Table Header Name (Optional) a name for the table.

  4. Use the steps in Filter a Data Table to set up a Data Table filter.
    A filter can be useful if you want to have different views of child records that show in a Data Table.

  5. In the Data Table, click Select Field to define the first field of the table.
    These are all the SObject fields available where the report template editor can pull data.

  6. At the Insert SObject Field popup, choose the SObject the same as you would in Insert References.
    Or you can select "No Field" and have nothing appear in the cell.

    Once you select the field, a suggested header appears based on the field you selected. You can change the header by clicking on it and entering new text. The column header changes to the name of the SObject field you chose.

  7. To add more columns, click Add column from the toolbar.

  8. You can drag the data table to other areas of the report.

    • You can add text or insert another field in the same cell as the first field.

    • You can only add another column and not another row.

  9. Repeat these steps to define more fields and rows.

  • Multiple Data Tables can exist in a report, but they must have different relationships.

  • You can drag the data table to other areas of the report.

  • You can add text or insert another field in the same cell as the first field.

  • With a Data Table, you can only add another column and not another row.

Filter a Data Table

You can filter a data table to show only certain child records for the root report template root object. Additionally, you can add conditions to the filter so records only appear if they meet certain defined conditions. In a filter, you can group conditions together so they execute before other conditions are completed.

Filters are useful if you only want a disappear certain child records. You can use this with other data tables in the report so even though the data tables reference the same child records, each data table only shows certain child records.

Example 1. Multiple Ticket Item Data Tables

You can use multiple ticket item data tables on a report, each filtered by a different record type such as equipment or labor.

  1. Click Filter Table icon.

    Filter Data Table Options

  2. At the Add or Edit Filter window,

    1. To define when the filter acts on the table, set the Take Action When dropdown and choose from these options:

      Table 1. Data Table Filter Options
      Option Description

      All Conditions Are Met

      Select this choice if you want the filter to return all results matching all the conditions. This choice uses the AND operator.

      Any Condition Is Met

      Select this choice if you want any of the conditions. This option uses the OR logic operator.

      Custom Logic Is Met

      Select this choice if you have multiple conditions in the filter. Each condition has a number. In the Custom Logic field, enter the logic.
      For example, if you had three conditions, but you wanted the filter to return results matching condition 1 and condition or just condition 3, you would enter 1 AND 2 OR 3

      Always
      (No Criteria)

      Use this choice to remove all the conditions in the filter to start over. You can’t enter any conditions here.

      Formula Evaluates to True

      Use this choice if the entered formula is true.

    2. Select the Resource from the dropdown.

    3. Select a logic Operator from the dropdown.

      You must choose a Resource before you can choose an operator.
    4. Enter a Value.

    5. To remove the condition, click Delete icon.

  3. To add another condition to the filter,

    A filter can have multiple conditions.

    1. Click + Add Condition.
      Another row appears below the first condition. You can only use the AND Boolean logic operator.

      Another Filter Condition

    2. Set the condition specifics the same way as for the first condition.

  4. To add a group to the filter,

    Use Groups if you want conditions to execute together.

    A filter can have multiple groups of different conditions.

    1. Click + Add Group
      A new block for the new group appears where you can set conditions.

      Another Filter Group

    2. Set the condition in the second group by repeating the above step.

    3. To add another condition in the second group, follow the steps in step 4.

  5. To save the filter, click Set Filter.
    The report template editor filters the data table.

Sort a Data Table

You can sort a data table by one of the SObject Fields in the data table. For the sort to work, there should be more than one SObject in the data table.

Sort Data Table options

  1. Click the Sort Field icon.

  2. At the Sort Field window,

    1. Click in the Sort Field and select the SObject field you want to sort by.

    2. Set the sort direction by Ascending or Descending.

  3. Click off the sort field to apply the sort.

Use a Summary Row in a Data Table

  1. Click into a row for a Data Table.

  2. Click the Summary Row icon in the data table formatting bar.
    Data Table Summary Row Icon
    A new row appears at the end of the Data Table with a SUM reference field pill.

  3. Click the icon again to remove the summary row.

  4. Click Delete to confirm the deletion.

Add and Configure a Layout Table

  1. Drag the Layout Table element to either the Header, Body, or Footer area of the Report Canvas.

    A blank 3 column by 3 row table appears on the Report Canvas.

  2. Use the Move icon to drag the Layout Table to the desired position on the canvas.

  3. Use the table layout toolbar to format the table.
    When you click off the table to another part in the Report Canvas, the table formatting bar disappears. Click into the table to enable it.

Add a DataGuide Form

For more information,

You must have the ServiceMax DataGuide package installed and at least one DataGuide Form created.
  1. Drag the DataGuide Form element to the Report Canvas.

  2. Select a DataGuide form from the list that appears.

    The forms that appear will be based on the base object of the report template you are currently working on.

    If you have multiple forms, you can use Search to find the form. The list of forms automatically filters based on what you type.

  3. Select the form and click Save.

    A block for the form appears on the Report Canvas. You can click the Gear to switch forms.

Add and Configure the Signature Block

  1. Drag the Signature element to the Report Canvas.

    Signature Element

    Signature block on Template Editor canvas

    You can drag a signature block inside a Layout Table cell. The header or footer can’t contain a signature block, only in the body of the template.
  2. At the Edit Signature window, complete the items in the Signature Block Options and click Save:

    The configured signature block appears on the report canvas:

    Signature Block

  3. To further edit the signature, click Gear Icon.

  4. To remove the signature block, click Trash Icon.

Insert References

You can insert a Metadata field anywhere in the Report Canvas. When the focus is on the field, the text toolbar can’t be used except for the insert button.

The insert menu places a field indictor, or "pill," into the cursor location.

  1. To insert a field, click Insert.

  2. Use the dropdown menus and select the type of field.

    Insert SObject field selection

    You can choose from a menu and submenu of field types:

    Type

    Option

    Field

    Base Object
    (Fields shown are for the Ticket or Invoice object)

    A list of SObject fields depending on if you had specified an Invoice or Ticket type of template.

    Invoice SObjects

    Invoice SObjects

    Ticket SObjects

    Ticket SObjects

    Date

    • Date

    • Time

    • Date and Time

    Use these fields to insert the current system date, current system time, or both.

    Page Number

    • Current Page

    • Page N of NN

    Use this field to insert the current page of the report in either the header or footer.

    Or if there are multiple pages, the NN is the total number of pages.

    User Profile

    • First Name

    • Last Name

    • Department

    Use these fields to pull the first name, last name, or the department name.

  3. Use the move bar to drag the field to another location on the Report Canvas, within a text block or a cell in a layout table.

    Field Pill

  4. To see specifics on the pill, hover your mouse over the field pill.

    You’ll see the name of the field, its API Name, and the current precision value (ex. 0.00) if the field uses numerical values.

Finish the Template

  1. After you have added and configured the elements for your template, click Save.

  2. To return to the list of templates, click < Templates.

Preview a Report

After you completed the design of a Report Template, you can generate a preview of how it will look.

  1. At the Report Template Editor Interface, click Preview icon .

  2. At the Preview Report for template window, select a Salesforce record from the dropdown to use as a sample.

  3. To generate the preview, click Select. The preview window appears showing what the report will look like.

Callouts for Preview Interface
Figure 1. Template Editor Preview
Table 2. Template Editor Preview Callouts
Callout Name Description

1

Hide thumbnails

Shows or Hides the thumbnail view.

2

Preview name

Internally generated name for the preview.

3

Thumbnail

Page thumbnail

4

Navigation controls

Page Count

Current Page out of total number of pages. If the report has multiple pages, the second number shows the total number of pages in the preview.

Zoom controls

Buttons to increase or decrease the zoom of the preview. The default zoom is in 100%.

Fit to Page

Fits the entire preview so you can see the whole page.

Rotate

Rotates the page counterclockwise (right to left).

5

Type

Shows the object type that is used for the report.

6

Download / Print / More

Download

Click to download the preview as a PDF. Change the filename and choose the location then click Save.

Print

Click to send the report to a connected printer.

More

You can:

  • See a two-page view of the report

  • Toggle on or off annotations

  • Present the report full screen

  • View the document properties

7

Preview

Shows the preview of the report.

8

Version Number

Shows the version number for the report viewer.

9

Edit

Displays a mini preview of the signature block (if there is one.)

10

Cancel / Create

Cancel – cancels the preview and returns to the Report Template Editor.
Create – attaches a PDF to the Notes & Attachments section of the Job in FieldFX Back Office

Open an Existing Template

  1. Open the Advanced Report Template Editor.

  2. Find the template to edit by clicking Edit Icon.
    The template opens in the Report Editor Canvas.

  3. You can edit the template using the processes in Create a New Template and Design the Template.