User Reference

The Gender Function

April 18, 2011 User Reference
Thumbnail image for The Gender Function

Generic documents such as contracts often have numerous places where the construct “his/her” appears, or perhaps “his” is used in the document and a preamble has words to the effect of  “masculine usage includes feminine and singular includes plural”. With document assembly, and XpressDox in particular, the template can provide instructions in conditional assembly which [...]

Read the full article →

The OrdinalSuffix Function

April 18, 2011 User Reference
Thumbnail image for The OrdinalSuffix Function

This function is used internally by XpressDox’s FormatDate function to form dates like March 3rd 2011.  The “rd” after the “3″ is known as an ordinal suffix.  The function used to return this date would be <<FormatDate(DateOfSignature,’MMMM o yyyy”)>> The template author would use the OrdinalSuffix function explicitly in order to render the “rd” above [...]

Read the full article →

The IncrementV Function

April 18, 2011 User Reference
Thumbnail image for The IncrementV Function

This function provides a useful way of adding an amount to an XpressDox variable. There are two forms of the function: <<IncrementV(‘Counter’)>> This will add 1 to the value of the variable ‘Counter’. <<IncrementV(‘Total’, UnitPrice)>> The value of the data element UnitPrice will be added to the value of the variable ‘Total’. Examples of usage [...]

Read the full article →

The GetListItem Function

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

This function is used to extract a value from a list. In the first example, the data element contains a number (an integer) which is used to get an item from a list, where the list is coded in the fillpoint itself: <<GetListItem(BondNumber,’First,Second,Third,Fourth,Fifth,Big’,',’)>> If the value of the ‘BondNumber’ data element is 2, then the [...]

Read the full article →

The HardSpace Function

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

This function converts spaces to “hard” or non-breaking spaces. When Word performs word-wrapping at the end of a line, a non-breaking space will not appear at the end of a line but will cause the characters on either side of it to be on the same line. <<HardSpace(FormatNumber(Amount,“#,#0.00”,“ZA”))>> If the ‘Amount’ data element is 1200 [...]

Read the full article →

The FormatDate and IncrementDate Functions

April 14, 2011 User Reference
Thumbnail image for The FormatDate and IncrementDate Functions

FormatDate Date data elements can be formatted according to the format patterns defined for the .NET framework. For example: <<FormatDate(dateofengagement,”yyyy-MM-dd”)>> <<FormatDate(dateofengagement,”dd MMM yyyy”,”af”)>> <<FormatDate(dateofdismissal,”d MMMM, yyyy”)>> <<FormatDate(dateofSignature,”MMMM o yyyy”)>> These examples would result in something like, respectively: 2008-02-29 29 Februarie 2008 29 February, 2008 February 29th 2008. Except for the Afrikaans example, the other results [...]

Read the full article →

The Max and Min Functions

April 14, 2011 User Reference
Thumbnail image for The Max and Min Functions

Max calculates the maximum of two values: The maximum of <<Number1>> and 100.1 is <<Max(Number1,100.1)>>. Min calculates the minimum of two values: The minimum of <<Number1>> and 100.1 is <<Min(Number1,100.1)>>.

Read the full article →

The Now and Today Functions

April 14, 2011 User Reference

Now The Now function inserts the current date and/or time into the document. It can be formatted in the same way as for FormatDate. <<Now(“d MMMM, yyyy”)>> yields ’4 November, 2010′ <<Now(“MMMM o yyyy”)>> yields ‘November 4th 2010′ <<Now(“yyyy/MM/dd HH:mm:ss.fff”)>> yields ’2011/04/14 17:05:23.010′ which is exactly the same as <<Now()>> A twelve-hour time with AM [...]

Read the full article →

The NumberPhrase Function

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

This function converts a number to words, in a number of languages. Suppose a data element with name ‘area’ has a value 1234: <<NumberPhrase(area,”af”,”ToUpper”)>> yields “EEN DUISEND TWEE HONDERD VIER EN DERTIG” <<NumberPhrase(area,”en”,”ToUpper”)>> yields “ONE THOUSAND TWO HUNDRED THIRTY-FOUR” Notes: i) The language code ‘af’ is the ISO639-2 code for Afrikaans (see ISO639-2 standards). ii) [...]

Read the full article →

The Replace Function

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

Replace is used to replace all occurrences of one string in a source string with another string: <<Replace(Address,”Ave.”,”Avenue”)>> “123 Long Ave., Cape Town” becomes “123 Long Avenue, Cape Town”

Read the full article →