Configure Print Inputs

You can configure a print template to take inputs at run time. This is useful if you want to allow the end user to supply a custom title, notes, or other text to include in the print output.

To configure a print template to take a text input, you add a String parameter to the template and then use the parameter in a Label control. The user will be presented with a text box to enter a value for the input.

You can configure default values for parameters. The preconfigured templates have two parameters: Title and Notes. The Title parameter has a default value, while the Notes parameter does not.

Example of input parameters in a Geocortex HTML5 viewer (left) and in a Web AppBuilder app (right)

Main Steps to Configure a Print Template to Take Inputs

  1. Add a parameter to the print template.
  2. Use the parameter in a Label control.
  3. Repeat these steps for each input.

Configure a Print Template to Take Text Inputs from the User

To configure a print template to take text inputs from the end user:

Step 1: Add a parameter to the print template

  1. Launch Print Designer and open or create a print template.

  2. In the Field List , click Parameters to show the Add button.

  3. Click Add parameter .

    A new parameter is added.

  4. Click Edit to edit the parameter.

  5. Configure the parameter's properties:

    1. Name: Type a name for the parameter, for example, Title or Notes.

      Use the name to reference the parameter: [Parameters.Name]

      The name can include letters, numbers, and underscore characters (_). The name cannot contain spaces or special characters.

      The Preview function uses the name to label the input text box.

    2. Description: Type a description for the parameter.

      The description is used to label the input text box in host applications.

      The description can include letters, numbers, spaces, and special characters.

    3. Visible: Make sure the Visible checkbox is selected.

    4. Multi-Value: Make sure the Multi-Value checkbox is cleared.

      Only single-value parameters of type String are presented to the end user as inputs.

    5. Type: Make sure Type is set to String.

      Only single-value parameters of type String are presented to the end user as inputs.

    6. Value: Optionally specify a default value for the parameter.

      The default value is used if the user does not enter a value. It is also used when you preview the print in Print Designer, if you don't enter a value.

    The configuration will look something like this:

    Example configuration for a parameter called notes

Step 2: Use the parameter in a Label control

  1. Drag the parameter from the Field List to the desired band.

    This adds a Label control that is configured with the expression [Parameters.parameterName], where parameterName is the name of the parameter that you added.

    Alternatively, you can add a Label control to the design surface and set its Expression setting to [Parameters.parameterName] in the Properties panel.

    Use a parameter called Notes in a print template by dragging it from the Field List to a band

  2. Adjust the size and position of the control and format it.

  3. Verify the parameter:

    1. Click Preview .

      The preview will prompt you for a value.

      Prompt to enter a value for the notes input

    2. Type a value in the Notes box.

      Alternatively, you can skip this step to accept the default value.

    3. Click Run to generate the print.

      The PDF will open in a new browser tab.

Step 3: Repeat for each input

  1. Repeat steps 1 and 2 for each input that you want to include in the print template.

© 2019 Latitude Geographics Group Ltd. All Rights Reserved.

Documentation Version 5.0