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,,email@example.com,firstname.lastname@example.org,email@example.com)» «Heading(EmailAddress,|^b^@Navy@CONTACT INFORMATION)» «Required(EmailAddress)» «SetInitialValue(EmailAddress,firstname.lastname@example.org)» «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:
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,;email@example.com;firstname.lastname@example.org;email@example.com,Required, firstname.lastname@example.org,hard;IsEmailAddress;The value is not a valid email address, please check and correct)?Enter the email address or choose one from the list»
The resultant interview is the same.
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, the Question Command and the Interview Manager (v14):
- For the sake of readability, many users prefer the use of several fillpoints. Although it makes the template longer, it is easier to read the code.
- 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.
- 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.
- Although the Define command provides many more features, the Question command (provided from v14) is a similar approach to defining many attributes about the data element in a single fillpoint.
- The Interview Manager assists (also from v14 onwards) assists with interview layout.