Salesforce

Inserting Fields into Documents/Templates

« Go Back
Information
Click to edit heading

Content controls are individual controls that you can add and customize for use in documents and templates.

A content control is a field pulling information from the data entered in LEAP.        

 
Click to edit heading

To see how you can use the legacy document fields, click on Inserting Legacy Fields into Documents/Templates.

 

Continue reading this article for inserting Content Control fields.

  • Desktop
  • Web

Using the Design Mode

 

Microsoft Word’s Design Mode is a handy tool to show/hide the content control codes.

Using this function can assist in document creation. It can also help all users in understanding which data inserts from LEAP. For instance, if the document is missing information, you can use Design Mode to check if the text is using fields.

  1. Open Microsoft Word.

  2. Click File at the top-left corner of Word. 

    Click Options at the bottom-left corner of Word.

    This will launch the Word Options window.

  3. Click the Customize Ribbon tab.

  4. Under the Customize the Ribbon section on the right, tick the Developer checkbox.

  5. Click OK to save.

  6. From the Word ribbon, click the Developer tab.

  7. Click Design Mode.

 
Click to edit heading

Please ensure Design Mode is not selected when you are inserting any fields. Design Mode is only for viewing content control codes.

Understanding Content Control

 

A content control code is in the following format: Matter.PersonActingFullName.

The first part of the name (Matter) is the Table Type, where the field is pulling the information from.

The second part, after the dot, is the field name itself.

So, in the above example, we are looking at the Person Acting Full Name field on the Matter table.

Field Tags

Fields are prefixed and suffixed to allow for easier searching and filtering, and to group items in similar categories so they appear in alphabetical order, making it easier for you to locate Fields and Calculations, and determining which to use when customizing your templates.

Prefix always appear as a button to the right of the field name in color.

Examples of common prefixes include [Address], [Card], [Matter], [Grammar].

Suffix always appear below the field name in grey.

Examples of common suffixes include (Multi), (Down), (Across), (Hard Return).

 

 
Click to edit heading

For a full list of Field prefixing and suffixing, please refer to our article Fields and Calculations used in Template Automation here.

Field Preview window to view the value of the Field data prior to use

When you click on a Field or Calculation in the Insert Fields panel, you will see the data value of the Field or Calculation automating directly from the matter you are currently in, displayed in the blue Field Preview window.

This alleviates the need for you to insert the Field into your Word document to see what value it produces, as you will see the data value that will be inserted shown at the bottom of the Insert Fields panel.

Find Fields Used in a Document

 

If you wish to insert a specific field—such as a property's address—into a document, please follow the steps below:

  1. Open the matter and check which table type contains the field you would like to insert into a document. 

    For example, the Property Address field was entered in the Property table of this matter.

    Address was entered in the property table of this matter

  2. From the Details & Correspondence tab, open or create a Word document from the matter.

  3. Within the LEAP document, click on the Editing within the LEAP Word ribbon and select Insert Fields

    This will launch the LEAP Document Automation pane on the right-hand side of your Word document.

  4. Click the Fields tab fields.

  5. Select the relevant table type that you wish to insert fields from.

    For example, select the Property table type from the drop-down filter.

    Select the Property table in the drop-down menu in Word

  6. Toggle the Show Hidden Fields option if required.

    Use the Search fields function to search or filter the list for the fields you desire.

    For example, enter "address" in the search field. You can view the data entered on the matter via the Field Preview below.

    Search for the address field and insert it into your document

  7. Place the cursor in the Word document where you want to insert the field.

    From the LEAP Document Automation pane, double-click on the field to insert.

    The selected field will be inserted at the cursor's position in the Word document. 

 
Click to edit heading

Please note that LEAP is not designed to work with fields inside textboxes which are inside headers. The values will not update.

Inserting Content Fields in a Document/Template

 
  1. Open the matter.

  2. Make sure you're on the Details & Correspondence tab.

  3. Open or create a Word document from the matter.

  4. From the LEAP ribbon, click Editing > select Insert Fields.

    A list of available fields will display on the right-hand side of the document.

  5. Make sure you're on the Fields tab fields.

  6. Under Fields, click the drop-down filter to select the relevant Table Type that you wish to insert fields from. For example: Card or Matter or Property etc.

    select the table type

  7. Use the Search Fields box to search or filter the list for the field(s) you desire.

    select the field

  8. Toggle the Show Hidden Fields option if required.

 
Click to edit heading

You can collapse and expand the Field Group Tags to easily search for the field you wish to insert.

  1. Place the cursor in the document where you wish to insert the field.

  2. Double-click the field you wish to insert.

    The selected field will be inserted at the cursor's position in the document with information populated based on the matter.

Inserting Fields into a Template for Use Across Multiple Matters

 

To insert field into a template which is to be used across multiple matter, you will need to modify the overall template template.

You can find examples below of fields inserted into templates for different scenarios. 

Addressing Clients

You may wish to customize how you address different clients at the top of a template based on different scenarios. You will need to set up certains fields to achieve this.

For the following scenarios, you can use the following setup outlined below:

  • If the Client is a Company with 2 staff members, the Trading Name will be displayed, followed by their names.
  • If the Client is a Company with 1 staff member, the Trading Name will be displayed, followed by their name.
  • If the Client is a Company with no listed staff members, only Trading Name will be displayed.
  • If the Client is an Individual, the Individual's name will be displayed.

See below for an example how to insert these fields:

  1. To insert the Current Date:
    Select Table type = Matter
    Select Field = Current date

    Check Field Preview to view the data that the field contains.
    Double click Current Date to insert this field in the desired position.

  1. Insert a field for the Company Trading Name:
    Table type = Client
    Field = Trading name

  1. Insert a field for the ACN/ABN:
    Table type = Client
    Field = ACN/ABN number

  1. If the Client is a Company and there are 2 Staff Members
    Insert a field for the staff member of the company:
    Table type = Client
    Field = Mr & Mrs both given names

Turning on Content Control Field Shading

 
  1. Open the matter.

  2. Make sure you're on the Details & Correspondence tab.

  3. Open or create a Word document from the matter.

  4. From the LEAP ribbon, click Editing > Toggle Field Shading.

Formatting Fields

 
 
Click to edit heading

Fields can be formatted within your documents. For example, you may wish to change how the date is displayed or if the text is capitalised or not.

  1. Open the matter.

  2. Make sure you're on the Details & Correspondence tab.

  3. Open or create a Word document from the matter.

  4. Highlight the field you wish to format.

  5. From the LEAP ribbon, click Editing > Format Fields.

    The LEAP Format Fields will open in a new window.

  6. In the Field Type section, select the relevant format you wish to use.

  7. In the Format section, select the relevant format you wish to use.

  8. Click OK.

Advanced Coding Types

 
 
Click to edit heading

As customization of fields can become quite complicated, what follows is for simple custom fields only. If you need any advanced customization of your documents or templates, please contact LEAP.

When there is at least one Question created, the LEAP for Word Add-in will be available through the Add-ins tab at the top of Microsoft Office. It will display all Questions created through the content control tools, as well as a text box to enter the appropriate response.

Inserting a Question Field

 
 
Click to edit heading

A Question field will ask one in a panel on the right-hand side of your document and insert that answer.

  1. Open the matter.

  2. Make sure you're on the Details & Correspondence tab.

  3. Open or create a Word document from the matter.

  4. From the LEAP ribbon, click Editing > Insert Fields.

  5. Click the Questions tab questionson the left.

  6. Click New.

  7. Enter the Name of the Question which will be for your reference only (so you can insert the response in the required locations within your document).

  8. Type the question into the Text field.

  9. (Optional) Click  next to Text Parameter to enter any parameter details.

  10. (Optional) You can make the Question conditional via Condition. You can set a condition to display or hide the question.

    • If: Click Select Source to select the condition data source and set the format as needed. Select the comparison option using the dropdown list.
    • Then: Select Disable or Hide.
  11. Click the Answer tab and select the Answer Type you wish to create:

    • Text Box
    • Text Area
    • Date
    • Checkbox
    • Radio Buttons
    • Dropdown List
    • Checkbox List
    • Multi Select Dropdown List
  12. (Optional) Enter the Default Answer Text (if Static is selected as Source) or Default Answer Source (if FromSource is selected as Source).

  13. Click Save.

  14. In your document, place the cursor on where you would like to have the answer to the Question inserted.

  15. Double-click the newly created Question to insert the field.

Inserting Calculation Fields

 
 
Click to edit heading

Calculations are an advanced feature and will require experience in JavaScript. It is advised to contact LEAP to assist in the use of this feature.

  1. Open the matter.

  2. Make sure you're on the Details & Correspondence tab.

  3. Open or create a Word document from the matter.

  4. From the LEAP ribbon, click Editing > Insert Fields.

  5. Click the JavaScript Calculations tab  on the left.

  6. Click New.

  7. Enter the Name of the Calculation which will be for your reference only (so you can insert the response in the required locations within your document).

  8. Enter a Description of the Calculation.

  9. Select a Return Type from the drop-down list:

    • string: A series of characters as texts.
    • number: Numbers that can be written with, or without decimals.
    • boolean: True or false.
    • array: Represents a collection of elements, e.g. collection of strings, collection of numbers, etc.
    • image
  10. Click next to Calculation Code to view and search for Calculation Code Templates

    Double-click the Calculation Code Template to insert.

  11. (Optional) Click next to Parameters to select the type of parameters you wish to use, e.g. Field, Question, Calculation or Word App Template.

    Enter a Test Value for all parameters.

    You may also click to edit or to delete an existing parameter.

 
Click to edit heading

If the Parameter Description is too long, you can hover over the Parameter Description to view its full name.

  1. Edit the code as necessary in the Calculation Code editor.

  2. Place the cursor in the code editor where you would like to insert the Parameter.

  3. Double-click the name of the Parameter to insert the parameter.

  4. Click Run Code to confirm or verify your code output via Result.

  5. Click Save to save the new calculation.

  6. Place the cursor in the document where you would like to insert the calculation.

  7. Double-click the new Calculation field to insert.

Inserting Repeating Sections

 
 
Click to edit heading

A repeating section is a control that contains other controls and that repeats as needed. Use a repeating section when you want to display variable amounts of data on a document.

  1. Open the matter.

  2. Make sure you're on the Details & Correspondence tab.

  3. Open or create a Word document from the matter.

  4. From the LEAP ribbon, click Editing > Insert Fields.

  5. Click the Repeating Sections tab repeating sections on the left.

  6. By default, the Insert in Table option will be toggled on.

    Untoggle if you do not need to insert the repeating section in a table row.

  7. Select the category you wish to use from the drop-down list.

    By default, Matter Table is selected.

  8. Use the Search Fields to search or filter the list to the field(s) you desire.

  9. Select the Field or other categories' fields you wish to use.

  10. Place the cursor in the document where you wish to insert the field.

  11. Double-click the selected Field to insert.

Using Check Fields

 

Check Fields allows you to check conditional fields and synchronize them, relinking fields to the document.

When fields are blue you can go to Editing and Check Fields to resolve.

When fields are orange, they are successfully inserting data from the matter.

Inserting Signature Fields into a Letter or Document/Template

 

To insert a signature field into a letter, document or template, follow these steps: 

  1. Open your LEAP Matter.

  2. Make sure you are on the Details & Correspondence tab.

  3. Open or create the Letter or Template you wish to add your signature to.

    Microsoft Word will open.

  4. From the LEAP ribbon, select Editing > Insert Fields.

  5. Select Matter from the Fields drop-down, and then select "Person acting - signature".

  6. Double-click to insert the field into your document.

 
Click to edit heading

The signature field information or image is obtained from the Application Settings Staff Members > Additional Details. Click here to learn more about creating your staff signature.

Editing IF Statement and Question for Which Signature Is Used

 

You may have a document where signatures have been coded in with IF statements. Over time, you may need to edit staff names in the coding. Below is an example of how to do this. There is also a LEAP Webinar video detailing steps:

  1. Right-click the document you wish to edit and select Edit.

    This will launch the document in Microsoft Word.

  2. Turn on Design mode to see the coding.

    To do this, right click on the ribbon and select Customize the Ribbon.

    On the right hand side of the Word Options window, ensure the Developer option is ticked. Once ticked, the Developer tab will appear in the main menu.

    Under Developer, click Design Mode.

  3. To insert or edit a signature, select Add-ins from the menu, click on LEAP for Word.

    This will bring up the LEAP for Word window pane.

  4. Go to the LEAP tab > Editing > Insert Fields.

    This will bring up the LEAP Document Automation window pane.

    Select the Question tab questions.

    Design mode

  5. Setup the Questions:

    Question

  6. Setup the Answers:

    Answer

  7. Go back to your document and place the cursor where to want the signature to be.

    To create an IF Statement:

    1. To view the existing IF Statement, press Alt – F9 or Fn – Alt – F9.
    2. To create new Statement brackets, if none exist, press Ctrl – F9 or Fn – Ctrl – F9.
    3. Enter the formula inside the brackets: { IF “” = “” “” “” }.
    4. Double-click q_Signature from the LEAP Document Automation window pane to insert the question field, q_Signature, in the first quotation marks: { IF “field/question” = “” “” “” }. 
    5. Enter the field or question result in the second quotation marks and the value in the third one: { IF “field/question” = “field/question” “the important information that shows in the document” “” }.
    6. Leave the fourth and final quotation marks empty.

    Example: 

    { IF “q_Signature” = “Tony” “Tony imageofsignature” “” }

    To edit an If But Then Statement:

    1. To see the If But Then Statement, press Alt – F9 or Fn – Alt – F9.
    2. Edit the details in the Statement.

Select Print to LEAP as Default

 

Whilst generating a template, the following messages may appear:

  • Objects cannot be created from editing field codes
  • Waiting for printer connection...

To resolve these, please follow these steps:

  1. Press the Windows start button or Windows key > open Printers & Scanners.

  2. Under Printer preferences > Let Windows manage my default printer > Toggle Off.

  3. Under Add a printer or scanner > select Print to LEAP > Set as default.

 
Click to edit heading

This feature is only available in Microsoft Office Desktop applications and not on Microsoft Office Online.

Using the Design Mode

 

Microsoft Word’s Design Mode is a handy tool to show/hide the content control codes.

Using this function can assist in document creation. It can also help all users in understanding which data inserts from LEAP. For instance, if the document is missing information, you can use Design Mode to check if the text is using fields.

  1. Open Microsoft Word.

  2. Click File > Options at the top-left corner of Word.

    The Word Options will open in a new window.

  3. Click the Customize Ribbon tab.

  4. Under the Customize the Ribbon section, tick the Developer checkbox.

  5. Click OK to save.

  6. Click the Developer tab.

  7. Click Design Mode.

 
Click to edit heading

Please ensure Design Mode is not selected when you are inserting any fields. Design Mode is only for viewing content control codes.

Understanding Content Control

 

A content control code is in the following format: Matter.PersonActingFullName.

The first part of the name (Matter) is the Table Type, where the field is pulling the information from.

The second part, after the dot, is the field name itself.

So, in the above example, we are looking at the Person Acting Full Name field on the Matter table.

Inserting Content Fields in a Document/Template

 
  1. Open Microsoft Word.

  2. Click File > Options at the top-left corner of Word.

    The Word Options will open in a new window.

  3. Click the Customize Ribbon tab.

  4. From the LEAP Web ribbon, click Editing > Insert Fields.

    A list of available fields will display on the right-hand side of the document.

  5. Make sure you're on the fields Fields tab.

  6. Under Fields, click the drop-down filter to select the relevant Table Type that you wish to insert fields from.

  7. Toggle the Show Hidden Fields option if required.

  8. Use the Search Fields to search or filter the list to the field(s) you desire.

  9. Place the cursor in the document where you wish to insert the field.

  10. Select the field you wish to insert.

  11. Double-click the selected field to insert at the cursor's position in the document with information populated based on the matter.

Formatting Fields

 
 
Click to edit heading

Fields can be formatted within your documents. For example, you may wish to change how the date is displayed or if the text is capitalized or not.

  1. Open the matter.

  2. Make sure you're on the Details & Correspondence tab.

  3. Open or create a Word document from the matter.

  4. Highlight the field you wish to format.

  5. From the LEAP Web ribbon, click Editing > Format Fields.

    The LEAP Format Content Control Field will open in a new window.

  6. In the Field Type section, select the relevant format you wish to use.

  7. In the Format section, select the relevant format you wish to use.

  8. Click OK.

Advanced Coding Types

 
 
Click to edit heading

As customization of fields can become quite complicated, what follows is for simple custom fields only. If you need any advanced customization of your documents or templates, please contact LEAP or a LEAP Certified Consultant.

When there is at least one Question created, the LEAP for Word Add-in will be available through the Add-ins tab at the top of Microsoft Office. It will display all Questions created through the content control tools, as well as a text box to enter the appropriate response.

Inserting a Question Field

 
 
Click to edit heading

A Question field will ask one in a panel on the right-hand side of your document and insert that answer.

  1. Open the matter.

  2. Make sure you're on the Details & Correspondence tab.

  3. Open or create a Word document from the matter.

  4. From the LEAP Web ribbon, click Editing > Insert Fields.

    A list of available fields will display on the right-hand side of the document.

  5. Click the Questions tab questions.

  6. Click New.

    The Question Details will be displayed in the window.

  7. Enter the Name of the Question which will be for your reference only (so you can insert the response in the required locations within your document).

  8. Type the question into the Text field.

  9. Select the Answer Type you wish to create:

    • Text: Text answer or from a particular table type value.
    • Multiple Choice: List of multiple-choice answers to select from.
  10. Click Save.

  11. In your document, place the cursor on where you would like to have the answer to the Question inserted.

  12. Double-click the newly created Question to insert the field.

Inserting Calculations

 
 
Click to edit heading

Calculations are an advanced feature and will require experience in JavaScript. It is advised to contact, please contact LEAP or a LEAP Certified Consultant to assist in the use of this feature.

  1. Open the matter.

  2. Make sure you're on the Details & Correspondence tab.

  3. Open or create a Word document from the matter.

  4. From the LEAP Web ribbon, click Editing > Insert Fields.

    A list of available fields will display on the right-hand side of the document.

  5. Click the JavaScript Calculations tab  on the left.

  6. Click New.

    The Calculation Details will be displayed in the window.

  7. Enter the Name of the Calculation which will be for your reference only (so you can insert the response in the required locations within your document).

  8. Enter a Description of the Calculation.

  9. Select a Return Type from the drop-down list:

    • string: A series of characters as texts.
    • number: Numbers that can be written with, or without decimals.
    • boolean: True or false.
    • array: Represents a collection of elements, e.g. collection of strings, collection of numbers, etc.
  10. Click Edit Javascript.

    The LEAP Edit Javascript editor will open in a new window.

  11. (Optional) Click New next to Input Parameters to select the type of parameters you wish to use, e.g. Field, Question, Calculation or Word App Template.

    You may also click to edit or to delete an existing parameter.

  12. Place the cursor in the code editor where you would like to insert the Input Parameter.

  13. Click the name of the Input Parameter to insert the parameter.

  14. Edit the code as necessary in the editor.

  15. Click Run Code to confirm or verify your code output via Test Output.

  16. Click OK to close the editor.

  17. Click Save to save the new calculation.

  18. Place the cursor in the document where you would like to insert the calculation.

  19. Double-click the new Calculation field to insert.

Inserting a Conditional Field

 
 
Click to edit heading

A Conditional field will display information depending on information within the current matter, or responses to questions. For example, you may want different text in your document depending on the answer to a Question.

  1. Open the matter.

  2. Make sure you're on the Details & Correspondence tab.

  3. Open or create a Word document from the matter.

  4. From the LEAP Web ribbon, click Editing > Insert Fields.

    A list of available fields will display on the right-hand side of the document.

  5. Click the tab.

  6. Place the cursor in the document where you would like to insert the Conditional Field.

  7. Click New.

    The Conditional Field Details will be displayed in the window.

  8. Enter the Name of the Conditional Field which will be for your reference only (so you can insert the response in the required locations within your document).

  9. Enter a Description of the Conditional Field.

  10. Select the appropriate field and click Select.

  11. Enter a Test Value.

    You may click Add Empty Value or Add Default Value instead of manually entering a Test Value.

  12. Click Save.

5/13/2025 2:54 AM
Inserting Fields into Documents/Templates
Document-Fields-US
Published
Image Gallery
Field Tags preview USField Tags prefix USField Tags suffix US

Powered by