Sometimes it would be useful to be able to customize a source template for more than just the letter body. For example, it may be that the Data Set contains data for more than one set of addressees and the source document needs to be able to indicate which of these addressees is to be included on the base template.
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()» «Name_of_Client»«If(not(EndsWith(ToLower(Name_of_Client),’s’)))»’s«Else()»’«End()»
Use this command to display a Checkbox on the interview. Command structure: «ChooseUsingCheckBox(Beneficiary,Y,N,N)» Examples of usage: The command can be written as simply as this, and when the data element is chosen its value will be ‘true’ and when not chosen, an empty string. For example: «ChooseUsingCheckbox(Beneficiary)» «When(Beneficiary
The StartsWith function (an XSLT function) is used to test whether a string starts with a given string: «If(StartsWith(Surname,’van ‘)»«Title» «Surname» is probably of Dutch descent.«End()» «If(StartsWith(Surname,’van ‘)»«Setv(‘LastPart’,substring-after(Surname,’van ‘))»«End()» In previous versions this command was known as starts-with. Backward compatibility ensures that XpressDox will still recognize this command.
Missing or superfluous End commands When a template is run, XpressDox will check for missing and floating End commands as well as floating Else commands. Wherever possible, the error message warning about one of these situations will give some context within the document where the relevant command is, so that
Count This function can be used to return the number of instances of a given repeated item. «ForEach(Child)» «Child_Name» «End()» Number of children: «count(Child)» Conditions may be added to the «Count» command, as illustrated below: «ForEach(Child)» «Child_Name», (Age «Age») «End()» Number of children 12 years or older: «Count(Child[Age >= 12])»
Classic Usage In addition to forcing the saving of data sets and naming them using the SetSavedDataFileName command, the template author can use the «SetSavedDataFolder()» command to define where the data sets should be saved. Here is an example: «SetDataSaveFolder(Datasets\<AccountNumber>)» If the DataSaveFolder set in this way is a relative
Particularly in the situation where data are included in the data set from a data source, text file or perhaps Standard Data Elements, it may be that the template author does not want the user to be able to view those data values in the interview. Such data elements can
ChooseFromFile is in some ways similar to ChooseFromDataSource, except that the data are defined either in a simple text file, csv file, or an XML file, and the file does not have to be configured into the Data Sources configuration: «ChooseFromFile(lookups:Correspondents.txt)» «ChooseFromFile(shared:Partners.csv)» Text file The first line of the text file
This command can be used to provide help text for the XpressDox interview: Command structure: «Help(Interest,Enter the rate of interest, excluding the % sign)» Examples of usage The Help command can appear anywhere in the template, not necessarily anywhere close to where the data element will be used. But keep in mind
Classic Usage Much like the SetSavedDocumentFileName command, the «SetSavedDataFileName()» command not only ensures that the answer set is saved, but also how it should be named. Regardless of whether the user checks the Save Merged Document? check box on the data capture interview for that template, this command forces the
This function is used to test for a string anywhere inside another string, and would appear inside a command such as If, When or Iif. Example: «If(contains(Surname,’prmzl’))»«Surname» is not an English name.«End()» Related articles: Read more about testing various parts of a string here
Using the If command, chunks of text can be included in or excluded from the assembled document depending on values provided by the user in the interview. Command structure: «If(Balance_Outstanding > 10000)» «If(Beneficiary = ‘Yes’)» Examples of usage: Suppose special wording is required when the Balance_Outstanding is greater
Classic Usage In addition to forcing the saving of documents and naming them using the SetSavedDocumentFileName command, the template author can use the «SetSavedDocumentFolder» command in the template to have control over where the documents are stored. Here is an example: «SetSavedDocumentFolder(Documents\<AccountNumber>)» If the Document Save Folder set in this
After a template is run and the document has been produced, the «ComeHereAfterRun()» command will cause the Word cursor to position itself at the point in the document where this command appears. Command Structure «ComeHereAfterRun()» Examples of usage Typically this would be used in a general letter which is
Use this command when a field should not be left empty on the interview. Command structure: «Required(AccountNumber)» Examples of usage: Mark one mandatory field as required:«Required(AccountNumber)» Add a second parameter to the command to indicate what type of data should be entered into the required field.«Required(DateOfBirth,date)» List more
Today inserts the current date into the document. It can be formatted in the same way as for FormatDate. Command structure: «Today(‘MMMM d yyyy’)» Examples of usage: A template run on the September 1st 2021: «Today(‘MMM d, yyyy’)» would yields ‘Sep 1, 2021’ «Today(‘MMMM o yyyy’)» would
Now() inserts the current date and/or time into the document. It can be formatted in the same way as FormatDate. Command structure: «Now(“d MMMM, yyyy”)» Examples of usage: «Now(“d MMMM, yyyy”)» yields “2 September, 2020”«Now(“MMMM o yyyy”)» yields ‘September 2nd 2020’«Now(“yyyy/MM/dd HH:mm:ss.fff”)» yields ‘2020/09/02 17:05:23.010’ which is exactly
The «SetSavedDocumentFileName()» command not only ensures that the merged document is saved, but also how it should be named. In the desktop (Word) version of XpressDox, there is a checkbox for the user to choose whether or not to save their assembled document. But regardless of whether the user checks
A caption can be used to make the question text for a field more descriptive on the interview. Command structure: «Caption(FieldName,Descriptive Caption Text)» Examples of usage: Simple example:«FirstName»«Caption(FirstName,First Name of Defendant)» Style the caption with a font and color:«Caption(FirstName,^b^@Blue/Microsoft Sans Serif/10@First Name of Defendant)» Style a portion of
XpressDox has been designed to fill marked-up templates in two general situations: The first is when data is captured and stored as part of an application; and, the second is to assist users who use the system within Microsoft® Office Word to produce standard documents.
In XpressDox Docussembly™ document assembly software any number of Helper Folders can be configured. A typical example of a folder for which this type of shortcut is defined would be one in which letterheads or other standard templates like fax headers, etc. are kept. In this way these standard templates can be kept separately to the templates that use them.