User Reference

The StartsWithVowel Function

April 14, 2011 User Reference
Thumbnail image for The StartsWithVowel Function

The result of this function would typically not be included directly in the merged document, but would be used in a conditional, such as: If <<When(StartsWithVowel(Fruit),an,a)>> <<Fruit>> is ripe it tastes better than if it is rotten. The function assumes that ‘a’, ‘e’, ‘i’, ‘o’ and ‘u’ (and their uppercase variants) are the only vowels. [...]

Read the full article →

The TableLookup Function

April 14, 2011 User Reference
Thumbnail image for The TableLookup Function

The TableLookup function enables the calculation of an amount from a table. Typically this is used with tax tables, or other tables of tariffs. The normal tax calculation for South Africa for the 2008/09 tax year is based on this table (reproduced from the South African Revenue Services web site): Taxable income (R) Rate of [...]

Read the full article →

Change the Case of a Value

April 14, 2011 User Reference
Thumbnail image for Change the Case of a Value

ToUpper. This will place the uppercase value of the data into the document:<<List(parties,ToUpper(firstname) ToUpper(surname),!, , and )>>“Fred Basset” becomes “FRED BASSET” ToLower. Converts the value to lowercase:<<ToLower(NatureOfAccount)>>“DEBTOR” becomes “debtor” ToSentence. Converts the value to lower case except for the first character which is converted to upper case:<<ToSentence(ProductDescription)>>“WIDE GAUGE RAILWAY TRACK” becomes “Wide gauge railway track” [...]

Read the full article →

The WindowsLogonUser Function

April 14, 2011 User Reference
Thumbnail image for The WindowsLogonUser Function

This function is used to gain access to the user name with which the person running the template logged on to Windows The person running this template is logged on to Windows with the user name: <<WindowsLogonUser()>>. It is often used in conjunction with the SetSavedDocumentFolder and SetSavedDocumentFileName commands in order to create a file [...]

Read the full article →

The Define Command

March 30, 2011 User Reference
Thumbnail image for The Define Command

XpressDox gives quite a lot of power to template authors in controlling the layout of the interview for a template. 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,,jlsmith@ipprovider.com,egjones@inkpen.com,mcontrary@inkpen.com)>><<Heading(EmailAddress,|^b^@Navy@CONTACT INFORMATION)>> <<Required(EmailAddress)>> <<SetInitialValue(EmailAddress,audrey@inkpen.com)>> <<Rule(EmailAddress,hard,IsEmailAddress,’The value is not a [...]

Read the full article →

Testing parts of a string

January 22, 2011 User Reference
Thumbnail image for Testing parts of a string

1. The starts-with function (an XSLT function)  is used to test whether a string starts with a given string: <<If(starts-with(Surname,’van ‘)>><<Title>> <<Surname>> is probably of Dutch descent.<<End()>> <<If(starts-with(Surname,’van ‘)>><<Setv(‘LastPart’,substring-after(Surname,’van ‘))>><<End()>> 2. EndsWith tests the end of a string: <<If(EndsWith(Surname,’-Smith’)>> <<Surname>> is a double-barrelled name. <<SetV(‘FirstPart’,substring(Surname,1,string-length(Surname) – 6))>><<Comment(SetV(‘FirstPart’,string-before(‘-Smith’)) is equivalent)>> <<End()>> 3. contains (an XSLT function) [...]

Read the full article →

The MergeTemplate function

January 22, 2011 User Reference
Thumbnail image for The MergeTemplate function

When XpressDox encounters a <<MergeTemplate()>> function while running a template, it will keep the template name specified in the command in a list, called the Templates to Merge List.  After completing the main template, all the templates in the Templates to Merge List will then be run, using the same data set as was used [...]

Read the full article →

The RunWordMacro Command

January 3, 2011 User Reference
Thumbnail image for The RunWordMacro Command

This command enables the template author to cause XpressDox to run a Word macro after the template has been merged. <<RunWordMacro(AlignParagraphs,TranslateDoubleQuotes)>> The above command will cause the two named macros (i.e. AlignParagraphs and TranslateDoubleQuotes) to be run after the template has been merged.

Read the full article →

The RunTemplates Command

January 3, 2011 User Reference
Thumbnail image for The RunTemplates Command

The<<RunTemplates>> command enables the template author to specify that more than one template should be run. <<RunTemplates(Letter,Contract,DebitOrder,FileCover)>> The four templates Letter.xdtpl, Contract.xdtpl, DebitOrder.xdtpl and FileCover.xdtpl will be run, one after the other.  The user will be presented with an interview for each template being run, but each interview will be pre-populated with data captured for [...]

Read the full article →

The IncludeTemplate Command

January 3, 2011 User Reference
Thumbnail image for The IncludeTemplate Command

An entire template file can be inserted into the document using the <<IncludeTemplate>> command. The included template can contain Fillpoint definitions and even issue further IncludeTemplate commands.  It is treated thereafter exactly as if the contents of that included template had been typed directly into the including template. Example: The description of the parties is: <<IncludeTemplate(PartyDescription)>> Notice [...]

Read the full article →