Tutorial Videos

Tutorial videos are available here.

Knowledge Base

Visit our User Forum for discussions & solutions

Make data source information available on all templates

A bit of background: when XpressDox runs a template, it needs two things: firstly, the template itself, and secondly a Data Set – i.e. the data elements which will be merged into the template to form the final merged document. (See XML and Data Sets for a more in-depth discussion.)

In the simplest case, the Data Set is captured by the user in the XpressDox data capture interview (the interview is constructed dynamically by XpressDox depending on the fillpoints specified in the template).

However, data can also be acquired from sources other than the user who is running the template, e.g.

  • from a Data Set saved when running another (or the same) template (this Data Set is what is chosen when the user clicks “Use Other Data” in the data capture interview);
  • from a text file (using the «ChooseFromFile» or «IncludeFileData» commands);
  • from a database or similar data source (using «ChooseFromDataSource» or «IncludeDataSourceData»).

The Include... commands are executed even before the interview is presented to the user. This means that the Data Set is already populated with data elements from the relevant file or data source before the user gets a chance to enter data. The fields in the interview with the same data element names as the data elements in the data source/file will then be displayed in the interview, for the user to peruse and possibly modify (and, obviously, to populate the merged document where required).

The Choose... commands are executed when the user presses the browser button on the interview. Once the user has made their choice, the data chosen are copied into the Data Set, and displayed in the interview.

Only those data elements which are referenced in the template are displayed – there can be many more which now form part of the Data Set but are invisible as yet because they are not referenced in the template being run.

Now: it will often be the case that there are data sources whose information should be available to all templates – either all templates in a particular folder, or all templates in a hierarchy of folders. (The kind of data required on all templates like this would be data like the company or branch contact details, and other global company-related information). Making this data available on all templates could be achieved by the template author remembering to code the command «IncludeDataSourceData(DataSourceName on every template. This is open to error because the template author might forget the command on one or more templates.

A less forgettery-prone solution is to use the “Use for All Templates” feature in the data source configuration dialog. If this option is selected in the configuration for the folder at the top of a folder hierarchy, then the data from that data source will be available to all templates run from any of the subsidiary folders.

A data source flagged “Use for All Templates” and configured in a user’s Home folder will also be available on all templates run by that user, subject to the operation of the option “Allow User Home Configuration to override this using the same name” (a checkbox at the top of the data source configuration panel, under the data source name). In other words, if a user runs a template from folder A and there is a data source with name X configured for A or one of its parent folders, then if there is also a data source with name X configured in the user’s Home folder, the user’s data source will be used only if the data source in folder A has the “Allow User Home Configuration to override …” option set.