Generating a document using Variables

Document Generate

Overview

In this article, you will learn how to generate a document using variables.

If your template has variables created using the Declare_Variable command of type such as Text, True/False, Filter, Record Id, etc., you can specify variables for these while generating the document.

Text

This variable type allows you to enter text values. You can use it to specify custom text that will be inserted into the generated document.

True/False

This variable type allows you to specify a boolean value, either true or false. You can use it to control the inclusion or exclusion of certain content in the generated document.

Filter

This variable type allows you to change the values of a command parameter at runtime. This means that you can generate different outputs without editing the template.

Record ID

This variable type allows you to specify the ID of a record in the system. You can use it to retrieve and insert data from that record into the generated document.

For more information about Declare_Variables Command, see DocProcessor Command Reference Guide.

Step 1. Open the Generate Reports screen

Select a project in Repository Explorer.

C:\Users\admin\AppData\Local\Temp\SNAGHTML34d65cc7.PNG

The Generate Reports screen opens for the selected project

INFORMATION

006

In TopTeam Desktop App, when you click Navigate menu > Generate Document > Document Generate using System wide Templates, the Generate Reports screen opens on TopTeam Web.

Step 2. Add a template that contains variables

NOTE

note_48.png

If you already have a template, go to step 5.

Step 3. Select your template

TIP

F:\Glyphs and Icons\IconDrawer\Classic 512 (New)\PNG\128\018.png

  • You can add a template as a private or shared template.

A shared template is visible to all team members, and a private template is visible only to you.

  • Adding a description is optional.

NOTE

note_48.png

After selecting a template, you can click the Define Variables link to specify variables while adding a template.

Learn more about defining variables by clicking here.

Step 4. After clicking Add, click Yes to define variables and click No to continue adding template without defining variables

If you want to define variables at this step, click Yes. Learn about defining variables by clicking here.

The template has been added and is ready to use

Step 5. On the Generate Reports screen, click the gear icon and select Manage Variables

Step 6. Add variables

Use Group Header (available under the Add Variable menu) to organize variables into different sections or categorize in the report. You can use it to group related variables together and make the report more readable.

C:\Users\admin\AppData\Local\Temp\SNAGHTML4388d23b.PNG

  • Caption – You can specify display name for each variable.
  • Allowed Record Types – Select all or multiple as well as a single record type.
  • Usage Hint – It is a text description that will display for each variable.
  • Is Mandatory – If selected, specifying a variable becomes mandatory for selection.

Display of variables that are added one-by-one

NOTE

note_48.png

It is not mandatory to add all the variables that are used in the template.

Step 7. You can clone, edit, and delete variables

Step 8. Select the template and click Generate

Step 9. The system prompts you to specify variable values

Step 10. Click Generate to generate the report

Step 11. The report has been generated

Revised: September 18th, 2023