Edit Content
Click on the Edit Content button to edit/add the content.

The Define Command

Controlling the layout of your interview in your XpressDox template

 

XpressDox gives quite a lot of power to template authors in controlling the layout of the interview for a template.

 

Controlling the layout using multiple commands:

For example, the layout commands for an email address might look something like this:


«Caption(EmailAddress,Email address for correspondence)?Enter the email address or choose one from the list.»
«ChooseFromSamples(EmailAddress,,jlsmith@ipprovider.com,egjones@inkpen.com,mcontrary@inkpen.com)»
«Heading(EmailAddress,|^b^@Navy@CONTACT INFORMATION)»
«Required(EmailAddress)»
«SetInitialValue(EmailAddress,audrey@inkpen.com)»
«Rule(EmailAddress,hard,IsEmailAddress,'The value is not a valid email address, please check and correct')»
«Tab(Contact Information,EmailAddress)»

Resulting in an interview which looks like this:

XpressDox Document Automation Software. The interview with many different commands.

 

But you could also control the layout in a single fillpoint:

The Define command enables the template author to combine all of these commands (and also the Footing information) into one command.  The above set of commands would then be included in a Define command as follows:


«Define(EmailAddress,Email address for correspondence,|^b^@Navy@CONTACT INFORMATION,,Contact Information,ChooseFromSamples,;jlsmith@ipprovider.com;egjones@inkpen.com;mcontrary@inkpen.com,Required,
audrey@inkpen.com,hard;IsEmailAddress;The value is not a valid email address, please check and correct)?Enter the email address or choose one from the list»

XpressDox Document Automation Software. The interview controlled with a single fillpoint.

 

The resultant interview is the same.

 

Interview relevance:

Note also that the Define command does NOT cause the value of the data element being defined to appear in the merged document.  In this respect its behaviour is exactly the same as for the various commands that it replaces.

In addition, if no fillpoint appears in the template which would result in the value of the data element appearing in the merged document, then the data element will not appear in the interview.  This is by design as it means that, for example, for a suite of templates, all the Define commands can be placed in a layout template which is included into every other template in the suite.  Then only those data elements that actually appear in a given merged document will appear on the interview for the template concerned.

In the screenshots provided above, there is a separate fillpoint for «EmailAddress» to ensure that it will appear on the interview.

 

Use the Command Assistant:

The Command Assistant contains a wizard which helps define all the parameters to the Define command, so it’s not necessary to remember the rather complex syntax and type the command in manually. Should you wish to edit something in the Define you can make use of the Edit Fillpoint button in the XpressDox ribbon. Everything you typed into the Define wizard will be presented back to you so that you can edit without worrying about the syntax.

 

Some further layout tips, and the Question Command (v14):

  1. The Footing definition appears between the Heading and the Tab caption, and in this case because the Footing is empty, there are two commas immediately after the Heading text.
  2. The Rule definition appears just as it would in the Rule command, but that the parameters to the Rule command are separated by semi-colons in the Define command.  This is also true of the values which will appear in the drop-down list.
  3. The Define command provides many more features, but the Question command (provided from v14) onwards takes care of most of these.
  4. The Interview Manager assists (also from v14 onwards) assists with interview layout.

 

Table of Contents