Parameter Basics

Objective

To create a simple parameter which is printed out in the generated document in order to demonstrate the parameters feature of AutoTag.

Pre-requisites

Inserting a Tag

Procedure

1. Load the MSSQL datasource

In order to select data for tags, you need a datasource. In this case we won’t actually be using the data, so it causes a snag for us, but generally when using AutoTag you will have a datasource connected in your document.

For this tutorial we simply selected the MSSQL datasource which was listed in the most recently used section. You can choose any datasource you have.

Show Me How!

2. Open the Parameters window

Parameters in AutoTag are managed in a separate window which can be opened by pressing the Parameters button in the AutoTag Manager ribbon. Here you’ll find the controls for adding and editing Parameters.

Show Me How!

3. Add a parameter and select a type

Go ahead and click the Add button and type a name for your parameter. We called ours hello after the first program that every programming language introduces: Hello World.

Show Me How!

4. Type a default value and description

Also after the popular Hello World program, we’ll be typing Hello World as the default value for our parameter. You can give it a description too which will show up in tool tips if you hover over the parameter.

Show Me How!

5. Click Save

Show Me How!

6. Insert an out tag with the parameter

We are going to try to display the parameter we just created in the document, so add an out tag to do this. Select the parameter from the Data tree.

Show Me How!

7. Generate a DOCX document

Now, generate a document using the usual Output and select an output format. Save the document if you haven’t already.

Show Me How!

8. Set the parameter and view the document

There is one extra step to generating a document this time – you must input a value for the parameter. The default value shows up, so you can use that, or type your own value. Notice in the results your parameter value appears in place of the out tag!

Show Me How!

Quiz Yourself!

How do I open the Parameters window?
By clicking Parameters in the AutoTag ribbon.
By clicking Parameters in the AutoTag Manager ribbon.
By clicking Parameters in the Insert ribbon.
From the start menu.
What are parameters useful for?
Inserting text in the document
Setting dynamic data and conditions in your documents which are entered at generation time
Just like in coding. It is for advanced users only.
Creating data for my out tags

Congratulations!

You have completed this tutorial. We recommend taking a look at the SQL - Part 1: Basic Selection tutorial next!

close
continue