Use Google to find help fast. For example, search on "xpressdox choosefromlist".

The CaptureLater Command

The CaptureLater Command

The CaptureLater command assists the template author in defining the relative position of data elements on the data capture interview screen.

When a template is run, XpressDox constructs a data capture interview which is guided by the XpressDox fillpoints which are coded in the template.  In particular, the sequence in which controls (those areas on the form where data values are typed) appear on the screen is the sequence in which the corresponding data elements are encountered by XpressDox in the template.

Thus a template looking something like:

<<Addressee>>
<<AddressLine1>>
<<AddressLine2>>

would result in the controls for Addressee, AddressLine1 and AddressLine2 appearing in the interview in that sequence.

However, a slight modification to this, such as:

<<Heading(AddressLine1,ADDRESS INFORMATION)>>
<<Addressee>>
<<AddressLine1>>
<<AddressLine2>>

would cause AddressLine1 to appear first in the interview (followed by Addressee and then AddressLine2), as the Heading command is the first place that AddressLine1 is referred to.

Some template authors take advantage of this behaviour by, for example, defining a template with only <<Caption>>, <<Heading>> and <<CaptureDataElement>> commands which is included at the start of all templates (with the <<IncludeTemplate>> command) and this has the effect of defining the sequence in which data elements appear on all interviews for those templates. Read more about layout of the interview here.

However, there is a side effect of this behaviour related to the <<BaseTemplate>> command, which may not be desired.

For example, a template (called the originating template) contains the <<BaseTemplate(CompanyLetterHead)>> command.  The base template (i.e. the template called CompanyLetterHead.xdtpl) looks something like:

<<Addressee>>
<<AddressLine1>>
<<AddressLine2>>

<<DocumentBody>>

and the originating template (whose text will replace the <<DocumentBody>> field in the base template) looks something like:

<<BaseTemplate(CompanyLetterHead)>>
<<Caption(ProductName,Name of Product)>>
<<Caption(SerialNo,Serial Number)>>


The intention of the template author is that the data elements ProductName and SerialNo appear at the top of the interview.

However, when the interview is constructed, the “template” that XpressDox is given to analyse is actually the base template with the originating template inserted where <<DocumentBody>> used to be.  That means that XpressDox “sees” the Addressee, AddressLine1 and AddressLine2 data elements before it sees the Caption commands for ProductName and SerialNo.  What this means is that the data elements in the base template will automatically appear in the interview above all the elements defined in the originating template.  Which in this example is not what the template author wants.

The CaptureLater command was introduced to assist with this sort of scenario.  When the command <<CaptureLater(Addressee)>> appears somewhere after the <<Addressee>> field (or, in fact, after any other command referencing the Addressee data element), this instructs XpressDox to defer its decision about where to place the Addressee field on the interview until it encounters another fillpoint referring to Addressee.  If this next occurrence (after the CaptureLater command) of Addressee itself is followed by <<CaptureLater(Addressee)>> then the process continues until either an occurrence of Addressee is NOT followed by CaptureLater, or until the last occurrence of Addressee (whether followed by CaptureLater or not), in which case this defines the relative position of Addressee on the interview.

In the example above, the Base template could be coded something like:

<<Addressee>>
<<AddressLine1>>
<<AddressLine2>>

<<CaptureLater(Addressee)>><<CaptureLater(AddressLine1)>><<CaptureLater(AddressLine2)>>

<<DocumentBody>>

This would have the effect that the relative positioning of the three data elements (i.e. the 3 referred to in the CaptureLater commands) on the interview would be defined by the positions of those data elements within the originating template.  If the originating template has no reference to the three address data elements, then the CaptureLater commands have no effect and the address data elements are positioned relative to where they were last encountered – i.e. at the top of the interview.

Another mechanism for directing the position of those three data elements in the interview would be to place the following in the originating template at the relevant position:


<<CaptureLater(Addressee)>><<CaptureLater(AddressLine1)>><<CaptureLater(AddressLine2)>>
<<CaptureDataElement(Addressee)>><<CaptureDataElement(AddressLine1)>><<CaptureDataElement(AddressLine2)>>

The CaptureLater command was introduced with Version 3 of XpressDox and is unavailable in previous versions.

Leave a Reply