Additional options for parameters
Once a parameter is added, you can edit it by clicking on the the Edit button. The following options can be edited:
Parameter name is the name used in expressions to access the value of the parameter, and must be unique within the project.
A parameter name may not start with _ (underscore).
In this field you enter a description that is displayed when the user is prompted to enter a value for this parameter.
Check Constant if this variable should always have a constant value. This value will not change during the merge. This value will also be available in unattended or web service mode.
Check Required if this variable should always have a value at the start of a merge. If checked and running in interactive mode, the application will always prompt you at the start of a merge. If checked and the value is not provided in unattended or web service mode, an error is reported.
Check Prompt in interactive mode if you want to enter the value for this parameter at the start of the merge. See dialog below.
This setting is unavailable with a merge running as a batch process or web service.
Check this if you want to allow the value of this parameter to be modified using the Set Parameter(s) value node.
Check this if you want to enter a multiline value for this parameter. When checked, the Default value text box expands for multiline input.
The default value will be used if no value is specified at the start of the merge. If you are not in interactive mode you can define parameters either on the command line or pass them as form fields or query parameters with a web request.
Set an input mask for the parameter value. The following may be used to set the input mask:
Any digit between 0 and 9 required.
Any digit or Space, optional.
Any digit, Space, + or - required. When left blank, it will be a Space in the Parameter value.
Letter (a-z or A-Z) required.
Letter (a-z or A-Z) optional.
Defining parameters in a properties file
Parameters can also be defined in a property file, for sharing between multiple merge projects. The properties file consists of one or more lines, where each line defines a single parameter.
The format of each line is as follows:
parameter_name = parameter_value
Using parameters in expressions
You can reference a parameter from any expression. To use the value of a parameter called orderID, use the following syntax:
The value of variable orderID = $[orderID]
A typical usage of a merge parameter is in the WHERE clause of a SQL query like this:
SELECT * FROM oders WHERE orderID=$[orderID]
This statement will select an order as specified by the merge parameter.
Passing parameters to an unattended merge
You can run a merge project from the command line using the variaDoc.EXE command line application. This is called an unattended merge, as it runs without user input, with any arguments passed as command line arguments. This method allows you to integrate variaDoc with other applications using batch files or as an external tool. An invocation typically looks like this:
c:\temp> variaDoc.EXE order.db /P orderID 10248
See Command line application for a detailed description of the usage of the variaDoc command line application.
Passing parameters to a webservice merge
You can run a merge as a web service using the variaDoc Microsoft IIS HTTP handler installed on a Microsoft IIS web server. Once the HTTP handler is installed, deploying a merge project as a web service is as easy as copying the variaDoc project file to your website. By pointing the browser to the URL, you invoke the merge that will stream the merged PDF document directly to the browser without intermediate files. Merge parameters are either passed as part of the web URL (HTTP GET) or as an HTML form (HTTP POST).
See Webservice, for a detailed description of how to run variaDoc as a web service.