The NEW XpressDox Version 14 is now available!

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

User Reference

The PrefixWith and SuffixWith Functions

PrefixWith This function is particularly useful in the situation where, say, you have an address consisting of data elements AddressLine1, AddressLine2, AddressLine3, and AddressLine4, but that perhaps lines 2, 3 and 4 are empty.  Further, you want to present the address in a single line, with the different AddressLine data elements separated by commas. You

Read More »

FileExists

This function can be used to test the existence of a file.   An example would be something like: «SetV(‘fileName’,concat(Directory,’\ExtraTemplate.xdtpx’))» «If(FileExists(GetV(‘fileName’)))» «MergeTemplate(GetV(‘fileName’))» «End(if exists)»   This will construct the name of a file in the XpressDox variable named ‘fileName’, and, if the file exists, issue the MergeTemplate command for it.

Read More »

The RemoveColumnIf and RemoveRowIf Commands

These two commands address some of the frustration involved in trying to include or exclude columns and rows in a Word table. REMOVECOLUMNIF It is almost impossible to think of a way to tell XpressDox to include a column in a Word table using «If(condition)» and «End()» to delimit the column boundaries.

Read More »

The FormatSeconds Function

If you have calculated (or been supplied) an elapsed time in seconds, then you can format that into a nicely legible format without having to divide by 60 for minutes, etc. «FormatSeconds(‘3675′,’HH:mm:ss’)» will render as “01:01:15” Another example would be: «ChooseUsingTimePicker(StartTime)» «ChooseUsingTimePicker(EndTime)» The time I spent was «FormatSeconds(SecondsBetween(EndTime,StartTime),’HH:mm:ss’)» You could make

Read More »

The PaintInsertedText Command

The command searches the template for any fillpoint which directly inserts text into the assembled document, and “paints” it with the specified color.   Command structure: «PaintInsertedText(Yes,Blue)»   Examples of usage: «PaintInsertedText(Yes,Red)» «Owner» (“Owner”) agrees to rent the property situated at «Property_Address» to «Renter» (“Renter”) for the term of this

Read More »

The ShowHidden Command

XpressDox has a powerful Relevance Engine which hides or shows controls (those areas where data for data elements are captured) on the interview. Take the following snippet: «ChooseFromRDBList(PartyType,Individual,Company)» The party is: «Name» and the «If(PartyType = ‘Individual’)»Identity Number is «IDNumber»«Else()»Company Number is «CompanyNumber» and Discount is «Discount»«End()» If the user chooses ‘Individual’

Read More »

The PositionOfRepeater Function

Please note that with effect from version 11.3, this function has been superseded by the RepeaterPosition function. For backward compatibility the use of PositionOfRepeater is supported, but is discouraged. Consider the commands OnExitSet and OnEnterSet. These commands are only executed during the lifetime of the interview, and also contain conditions

Read More »

The SaveDataset Command

In most cases after a template is run, XpressDox will save the Data Set (i.e. the XML file containing the data). Sometimes you might want to suppress the saving of the the data set. For example this might be when all the data for the data set are sourced from

Read More »

The Format Function

When concatenating strings together (see Concatenating Strings), it is not always easy to visualize what the end result will look like. This is especially the case when the strings being concatenated are a mixture of fixed text and values of data elements and functions. This situation often arises when using

Read More »

The ToHtml Function

The InsertFormattedText command will accept HTML text as input, convert it to an XpressDox document and then include it as if it were done with an IncludeTemplate command. Sometimes the data in a data element is not an entire HTML document, but a snippet. This snippet then needs to be

Read More »

The Button Command

Creates a button on the interview, which in itself has no functionality, but provides a method to initiate other commands.   Command Structure: «Button(XXX)»   Examples of usage: Sometimes, the template author would like to let the user initiate actions (database retrieval, modification of data elements, etc.) explicitly. This is

Read More »

The IsTrue Function

When an XML dataset is sourced from a data source, or perhaps from an XML text file which has been populated by user input, it is not always easy to determine beforehand what the format of some data elements will be.  This applies particularly to true/false options which in various

Read More »

The IncludeSpreadsheet and InsertSpreadsheet Commands

IncludeSpreadsheet With the IncludeSpreadsheet command, you can embed a spreadsheet into the assembled document.  This uses Microsoft’s OLE technology, which means that when viewing the assembled document, the user can double click on the spreadsheet, which will open the spreadsheet in Excel and the user will then be able to edit

Read More »

The UpdateFields Command

When there is conditional logic in a template which removes or adds text, then some of the Word constructs such as Word fields (like page numbers and other fields) are not updated automatically. Normally user intervention is required in order to get Word to update the fields (i.e. select the

Read More »

The IIf Function

This function is a kind of short cut to writing «If()» … «Else()»  … «End()» in certain circumstances.   Using If.. Else.. End: Suppose you want to write something like The amount of VAT applicable is …. Where the …. above is either zero, if no VAT is applicable, or

Read More »

The SubstringBeforeLast and SubstringAfterLast Functions

These two functions help with manipulation of strings like file paths or IP addresses which have multiple occurrences of a delimiter. For the following examples, assume the data element DocFilePath contains ‘C:\Documents\XpressDox\WordFile.docx’. SubstringBeforeLast can be used to get the name of folder from a full file path, e.g.: «SubstringBeforeLast(DocFilePath,’\’)» will

Read More »

The GetRegistryValue Function

This function does as its name implies: gets a value from the Windows registry. For example: «SetV(‘UserPrivileges’,GetRegistryValue(‘HKEY_CURRENT_USER\Software\VB and VBA Program Settings\Accounting\Options\UserPrivileges’)» This will get the registry value HKEY_CURRENT_USER\Software\VB and VBA Program Settings\Accounting\Options\UserPrivileges and put it into the XpressDox variable called ‘UserPrivileges’.  After that the variable can be inspected and assembly of the

Read More »

The Eq Function

Sometimes it is necessary to compare the value of a data element to one or more fairly lengthy strings.  This can be tedious for the template author and also open to typing errors.  The Eq function is useful in this situation as the comparison can include wild card characters.  It is

Read More »

The LinkToDataSourceOnEnter Command

This command works exactly the same way as the LinkToDataSource command, but it is triggered when the focus enters the control in the interview for the data element designated in the command. (In fact, the LinkToDataSource command could be re-named to LinkToDataSourceOnExit, in which case these two commands would be

Read More »

The Left and Right Functions

The substring function provides all the functionality to extract pieces of a string, but Left and Right make some operations easier. Left returns the leftmost characters, and Right the rightmost characters. In particular, extracting a substring at the end of a string can be quite complicated, needing knowledge of the

Read More »

The Lookup Function

This function has many uses, but in particular it is a great benefit when templates are being used in different regions where there a slight but significant changes in language. For example, a template being used anywhere in North America would need to take into account the different spellings of

Read More »

The InterviewRelevance Command

Overview When XpressDox constructs an interview, it uses the document assembly instructions in the template to guide the layout of the interview.  For example, if the first occurrence in the template of a fillpoint referencing the Name data element appears before the first occurrence of  Date_Of_Birth, then the data element Name will appear

Read More »

The SetCoreFileProperty Function

When viewing the  Word Advanced Properties for a document, there are a number of properties that appear, such as the Author, Comments, Keywords, etc.  Using the SetCoreFileProperty function, some of these Advanced properties can be set in the document which is merged from a template. For example «SetCoreFileProperty(‘Author’,WindowsLogonUser())» will set

Read More »