Managing contact details on letters

This is a variation on “You work for three bosses”, but on a larger scale.

It is supposed that you manage the templates for a large company with a large number directors and secretaries. Some secretaries work for more than one director, and others for only one (or the “secretary” is a director – i.e. by “secretary” we really mean the person running a template).

Company letterheads typically have a standard way of indicating the responsible person’s contact details. In this discussion the “responsible person” is a director.

That means that typically a letterhead template would have a section dedicated to the director’s details. A snippet of a letterhead might look like this:

Yours sincerely

«DirectorName»
Extension: «DirectorExtension»
Email: «DirectorEmail»

The issue is that we need to make sure that whoever is running a template that requires the director’s details is able to easily provide them. (“You work for three bosses” used a text file with directors’ details, and this is suitable for a small site where control is easy).

We need to have a database which is available to all users (i.e. people running templates) which can be maintained and kept up to date by a site administrator. As far as XpressDox is concerned this can be just about any database, but for purposes of discussion, this will be an Excel spreadsheet.

The workbook should have a spreadsheet called “Directors” and the first row should be the names of the data elements as they will appear in the template (i.e. in our example DirectorName, DirectorExtension, DirectorEmail, etc.). It is a good idea to have a short code (e.g. the director’s initials) which can be used as the “ID” of the data table, so a further column heading DirectorCode should also be included. (In fact if you make this DirectorCode the first column in the spreadsheet then the data source wizard referred to below will treat it in the way we would like).

The rows under the first row will then each contain the details for one director. There is a column called Secretary, and this needs to contain the Windows logon user name of the person who will run templates for the director concerned.

The spreadsheet would look something like the screen shot below (although ultimately will contain many more lines):
Managing contact details in XpressDox Docussembly™

Once the spreadsheet is complete it can be saved in a suitable location. For this example, suppose it is saved in exactly the same place as the letterhead template (at least it will be a shared location accessible by all users, and might also have suitable permissions to prevent unauthorised users from changing it).

The spreadsheet then needs to be made available to XpressDox by configuring it as a data source. The place to do this in this example would be the parent folder used in Configuring a multi-application environment , i.e. the folder P:\SharedApplications.

Configuring a data source is done in the “Data Sources” tab in the configuration UI for the relevant template folder (i.e. in this case P:\SharedApplications), as follows:

  • Press the “New Data Source” button on the Data Sources toolbar. This starts a wizard.
  • Choose “Excel Spreadsheet” from the list and press Next.
  • Press the Browse button and locate the spreadsheet. (The wizard will construct a “Connection String” which can be left as-is). Press Next.
  • Choose the Director spreadsheet from this list, and accept the suggestion of “Director” as to how you will refer to the table in XpressDox. Press Next.
  • The wizard will suggest that DirectorCode be used as the “ID” of the table – accept that by pressing Next.
  • The wizard now needs to know whether users must be able to select single rows from this spreadsheet (now called a “table” because it is being treated as a database) – the answer in this case is “yes”, and so click the relevant option and press Next.
  • We are using the standard way that XpressDox handles all databases, from Excel to Access to huge SQL Server databases. XpressDox will always construct a “search” dialog which will be presented to users to enable them to choose a row from the table in the database. What this search dialog looks like and how the user can filter it depends on the answers to the wizard dialog now visible. The only thing to be provided at this stage is the column on which the filter will operate, and it is suggested that this should be DirectorName. Select this and press Finish.
  • The data source name should be changed now to “Directors” – this is how it will be referenced by template commands in XpressDox. Press TAB after typing in the name.
  • Now type the following into the “Filter” text box in the configuration UI: Secretary='<WindowsLogonUser>' (this is why the “Secretary” column needs to contain the Windows Logon name of the relevant users), and then save the configuration.

    Make sure you include the single quotes ” around <WindowsLogonUser>.

  • You can test whether your setup is correct (and also get some idea of what the search UI looks like) by pressing the “Test Data Source” button (or, double-click the data source name on the left hand list view). After selecting a director, the system shows you what the XML data prepared for that director looks like.
  • You will then be asked whether you want a “schema” to be generated, and at this time the answer is “yes” – save the generated schema in the same folder as the spreadsheet, for future reference (this schema can be included in the Command Editor which will then enable you to easily select the data elements from the data source making sure that they are correctly spelled, etc.)

Now you are ready to let the user capture their director’s details:

  • On the letterhead template, somewhere near the beginning (although from XpressDox’s point of view the placing is irrelevant) put the command «ChooseFromDataSource(Directors)».
  • Run a template which is based on the letterhead, and see how the user will experience capturing their Director’s information (you will have to have at least one row in the table with a “Secretary” value equal to your logon user name).