Help

“The easiest way to learn XpressDox is to use it.”

Alphabetic Command List Command List by Category Tutorials and Cheat Sheets User Reference How to use the Command Editor

Click here for email support.

Command and Functions List by alphabet or by category

Category quick links:
Conditional, Data Capture, Data Sources, Formatting Dates, Formatting Numbers, Formatting Strings, Miscellaneous, Post Merge, Repeating, Templates, and Variables.

 

Alphabetic command listAlphabetic List of Commands and Functions

Command or Function Name Description and Examples
AlignCaptions

Sets whether captions on the interview should be aligned left or right

«AlignCaptions(Left)»

«AlignCaptions(Right)»

BaseTemplate

Base (or overlay) this template on another template

«BaseTemplate(LetterHead)»

«BaseTemplate(headings:LetterHead,Destination)»

Caption

Set the caption for the data element on the interview screen

«Caption(Amount,Capital amount of loan)»

«Caption(Amount,^bu^@Navy@Capital amount of loan)»

CaptureAllDataElements

Capture all data elements even if not used in this template

«CaptureAllDataElements(Yes)»

CaptureAsLongText

Capture a multi-line text values

«CaptureAsLongText(Address,3)»

CaptureDataElement

Places a control for the data element on the interview screen

«CaptureDataElement(Name)»

«CaptureDataElement(DateOfBirth,date)»

CaptureLater

Defer the capture of a data element to later in the interview

«CaptureLater(Name)»

CaptureOnlyEmptyValues

Specify whether only empty values should be shown in the interview

«CaptureOnlyEmptyValues(Yes)»

«CaptureOnlyEmptyValues(No)»

ChooseFromData

Choose from repeating data already in the data set

«ChooseFromData(IdOfOrder,Order/OrderID)»

«ChooseFromData(IdOfOrder,Order/OrderID,OrderDescription)»

ChooseFromDataElements

Choose from data already in the data set

«ChooseFromDataElements(CustodianName,../Respondent1,../Respondent2)»

ChooseFromDataSource

Choose a row from a data source

«ChooseFromDataSource(Contacts,Choose a Contact)»

«ChooseFromDataSource(Contacts,Type in the Contact's ID,RefreshSave,,DisallowSearch)»

ChooseFromFile

Choose data from a text or XML file

«ChooseFromFile(Lookups:Contacts.xdtxt,Choose a contact,NoRefresh,Surname)»

«ChooseFromFile(Lookups:Contacts.xdtxt,Choose the Borrower,NoRefresh,BorrowerSurname,Borrower)»

ChooseFromList

Present the user with a list of choices in a drop down list

«ChooseFromList(Province,Ontario,Quebec,British Columbia,Alberta,Manitoba,Saskatchewan,Nova Scotia,New Brunswick,Newfoundland and Labrador,Prince Edward Island)»

«ChooseFromList(Province,,Ontario,Quebec,'British Columbia', 'Alberta' ,Manitoba,Saskatchewan,Nova Scotia,New Brunswick,'Newfoundland and Labrador',Prince Edward Island)»

«ChooseFromList(Province,O~~Ontario,Q~~Quebec,BC~~British Columbia,A~~Alberta,M~~Manitoba,S~~Saskatchewan,NS~~Nova Scotia,NB~~New Brunswick,NL~~Newfoundland and Labrador,PE~~Prince Edward Island)»

ChooseFromRDBList

Present a radio button list of choices

«ChooseFromRDBList(Orientation,North,South,East,West)»

«ChooseFromRDBList(Clause,Security~~The undersigned undertakes to provide security covering the loan to be granted.,NoSecurity~~The undersigned is not required to provide security for the loan.)»

«ChooseFromRDBList(Clause,~~The undersigned undertakes to provide security covering the loan to be granted.,~~The undersigned is not required to provide security for the loan.)»

ChooseFromRepeatingData

Choose from repeating data already in the data set

«ChooseFromRepeatingData(IdOfOrder,Order/OrderID)»

«ChooseFromRepeatingData(IdOfOrder,Order/OrderID,OrderDescription)»

ChooseFromSamples

Presents a drop down list of choices, but the user can type their own if it is not in the list

«ChooseFromSamples(Title,,Mr.,Mrs.,Miss,Ms.,Prof.,Dr.)»

ChooseUsingCheckBox

Choose a value using a check box

«ChooseUsingCheckBox(RequiresSpecialSchooling,Yes,No,No)»

«ChooseUsingCheckBox(Clause,~~The Parties agree to cede their rights to various assets without prejudice.)»
«If(Clause != '')»
«Clause»
«End()»

ChooseUsingDatePicker

Choose a data element value using a date picker

«ChooseUsingDatePicker(DateOpened)»

Chr

Get a character value from its integer representation

«OnExitSet(AddressLine2,AddressBlock,Value,,concat(AddressLine1,Chr(13),AddressLine2),,EvenWhenNotEmpty)»

ComeHereAfterRun

Place a marker in the template where the cursor should be after the template has run.

«ComeHereAfterRun()»

Comment

Places a comment into the template

«Comment(Any arbitrary comments)»

concat

Concatenates any number of string values

«SetV('FullName',concat(FirstNames,' ',Surname))»

«SetV('Possessive',concat(Noun,'!'s'))»

contains

Test for a substring inside another string

«If(contains(Word,'q'))»the word contains 'q'.«End()»

count

Count – returns the number of a repeated item

«If(count(Child) > 0)»The number of children in the family is «count(Child)»«End()»

«If(count(Child) > 0)»The names of the children follow:«Foreach(Child)»«Name» «Surname»«End()»«End()»

«count(Child[Age < 12])»

CountOf

Get the number of occurrences of one string inside another

«CountOf('.',Name)»

«If(CountOf('.',Name) = 0)»The name contains no initials.«End()»

CreateDataElement

Create a data element in the template’s data set.

«CreateDataElement('ThisDataElement',GetV('ThisVariable')»

«CreateDataElement('ThisFileName'),GetValidFileName(AccountNumber)»

CurrencySymbol

Insert the currency symbol as defined in the Regional Settings

«CurrencySymbol()»

DaysBetween

Gets the number of days between two dates

«DaysBetween(EndDate,StartDate)»

«FormatNumber(((DaysBetween(Today(),DateOfBirth) div 365) - 0.5), '0')»

Debug

Debug missing or superfluous ‘end’ and ‘else’ issues

«Debug()»

Define

Define the interview properties of a data element

«Define(Amount,^biu^@Red@Caption text,|^b^@Navy@Heading text,Footing Text,Tab Caption,CaptureDataElement,,Required,Initial Value,hard;IsDigits;The amount must be numerics only.,Cases;RefreshSave;'Id=;')?Enter the amount of the deal.»

«Define(Title,^biu^@Red@Title of the party,|^b^@Navy@PARTY DETAILS,,Contact Information,ChooseFromList,;Mr.;Mrs.;Ms.;Dr.;Prof.)»

«Define(TaxIncluded,Is Tax included,,,,ChooseUsingCheckBox,Y;N;N)»

DocumentBody

Insert the body of the originating template into the Base Template

«DocumentBody»

Dolares

Render a numeric amount as a number of Dollars, in Spanish words

«Dolares(Price)»

«Dolares(Price,'ToUpper')»

Dollars

Render a numeric amount as a number of Dollars, in words

«Dollars(Price)»

«Dollars(Price,'ToUpper')»

DollarsFrancaise

Render a numeric amount as a number of Dollars, in French words

«DollarsFrancaise(Price)»

«DollarsFrancaise(Price,'ToLower')»

EndsWith

Test whether a string ends in a given string

«If(EndsWith(Surname,'-Smith'))»

EscapeForXml

Escape a string for use in XML

«EscapeForXml(Text)»

EuroDeutsch

Render a numeric amount as a number of Euros, in German words

«EuroDeutsch(Price)»

«EuroDeutsch(Price,'ToLower')»

EurosEspanol

Render a numeric amount as a number of Euros, in Spanish words

«EurosEspanol(Price)»

«EurosEspanol(Price,'ToUpper')»

EurosFrancaise

Render a numeric amount as a number of Euros, in French words

«EurosFrancaise(Price)»

«EurosFrancaise(Price,'ToLower')»

ExcludeFromDataSet

Exclude elements from the saved dataset

«ExcludeFromDataSet(DataElements,UserID,UserName,UserEmail,Child/Address)»

«ExcludeFromDataSet(DataSources,Users,Accounts)»

ExcludeFromIV

Excludes a data element from the capture interview for the template

«ExcludeFromIV(FirmName)»

«ExcludeFromIV(FirmName,FirmAddressLine1,FirmAddressLine2,FirmPostalCode)»

ExtractInitials

Extract Initials from name

«ExtractInitials(Fullnames,'.')»

«ExtractInitials(Fullnames,'')»

Footing

Place footing text below a data element in the interview

«Footing(CompanyName,)»

«Footing(CompanyPostalCode,|^bu^@Navy@END OF COMPANY DETAILS)»

ForEach

Repeat for a number of repeating data elements

«ForEach(Party)» «End()»

«ForEach(Party,Surname,ascending,text)» «End(for each)»

«ForEach(Child[Age < 12]) selects children whose age is less than 12» «End()»

FormatDate

Format a field as date and/or time

«FormatDate(DateOfBirth,'yyyy/MM/dd','en')»

«FormatDate(SignatureDate,'o MMMM yyyy')»

FormatNumber

Format Number

«FormatNumber(Amount)»

«FormatNumber(Amount,'#,0.00;(#,0.00)')»

«FormatNumber(Amount,'#,0.00;(#,0.00)','FR')»

Gender

Return a value depending on a party’s gender


«ChooseFromRDBList(PartyGender,Male,Female)»
«Gender(PartyGender,1,'he,she')» took «Gender(PartyGender,1,'his,her')» bag with «Gender(PartyGender,1,'him,her')»


«ChooseFromRDBList(PartyGender,,Y~~Male,X~~Female)»«Comment(Y and X are accepted as gender codes from genetics)»
«Gender(PartyGender,1,'he,she,it')» took «Gender(PartyGender,1,'his,her,its')» bag with «Gender(PartyGender,1,'him,her,it')»


«ForEach(Party)»«ChooseFromRDBList(PartyGender,Male,Female,Neuter)»«End(ForEach party)»
«Gender(Party/PartyGender,count(Party),'he,she,it,they')» took «Gender(Party/PartyGender,count(Party),'his,her,its,their')» bag«Plural(count(Party),'','s')» with «Gender(Party/PartyGender,count(Party),'him,her,it,them')»


«ChooseUsingCheckBox(OnlyOneParty,Y,N,N)»
«Gender(PartyGender,(OnlyOneParty = 'Y'),'he,she,it,they')» took «Gender(PartyGender,(OnlyOneParty = 'Y'),'his,her,its,their')» bag«Plural((OnlyOneParty = 'Y'),'','s')» with «Gender(PartyGender,(OnlyOneParty = 'Y'),'him,her,it,them')»


«ForEach(Party)»«ChooseFromRDBList(PartyGender,M,V,D)»«End(ForEach party)»
«Gender(Party/PartyGender,count(Party),'hy,sy,die ding,hulle','M,V,D')» het «Gender(Party/PartyGender,count(Party),'sy,haar,sy,hulle','M,V,D')» sak«Plural(count(Party),'','ke')» saam met «Gender(Party/PartyGender,count(Party),'hom,haar,hom,hulle','M,V,D')» gevat.

GetListItem

Extract a value from a delimited list

«GetListItem(ListItem,'First,Second,Third',',')»

«GetListItem(4,IP_Address,'.')»

«GetListItem(GetV('element number'),PeriodicTable,',')»

GetV

Get the value of a variable

«GetV('Balance')»

GetValidFileName

Get a string which only has valid file name characters

«GetValidFileName(AccountNumber)»

«GetValidFileName(AccountNumber,'-')»

«CreateDataElement('TargetFileName',GetValidFileName(AccountNumber,'-'))»

GetValidXmlElementName

Converts the passed string to a valid XML element name

«GetValidXmlElementName(Name,'_and_')»

GetVn

Get the value of a variable used as numeric

«Party[GetVn('Counter')]/Name»

HardSpace

Convert normal spaces to non-breaking spaces

«HardSpace(Phrase)»

«HardSpace(Pounds(Price))»

Heading

Place heading text above a data element in the interview

«Heading(CompanyName, COMPANY DETAILS)»

«Heading(CompanyName,|^bu^@Navy@COMPANY DETAILS)»

Help

Provide help text (to be shown in the Help area) for a data element

«Help(Amount,Enter the amount of the loan)»

HideEmptyInterview

Specify whether or not an empty interview should be hidden

«HideEmptyInterview(Yes)»

«HideEmptyInterview(No)»

Hyperlink

Attach a hyperlink to a heading or footing

«Hyperlink(Description,Heading,www.xpressdox.com)»

«Hyperlink(Description,Heading,www.xpressdox.com/

If

Conditionally include text into the document

«If(Answer = 'No')» «End(If)»

«If(Answer = 'Yes')»text when Answer is 'Yes'«Else()»text when Answer is not 'Yes'«End(If)»

«If((Answer = 'Yes') or (Answer = 'Maybe') and (Amount > 500)»«End()»

«If(position()= 1)»This applies only to the first repeating item.«End()»

«ForEach(Party)»«PartyFullNames»«If(last() > 1)»«When(position() < last()-1,!, )»«When(position() = last()-1, and )»«End(party > 1)»«End(for each)»

«ChooseFromRDBList(Gender,Male,Female)»«If(Gender = "Male")»«SetV("PronounHe","he")»«Setv("PronounHim","him")»«SetV("PronounHis","his")»«Else()»«SetV("PronounHe","she")»«SetV("PronounHim","her")»«SetV("PronounHis","her")»«End()»«RemoveParagraph()»
«GetV('PronounHe')» took «GetV('PronounHis')» bag with «GetV('PronounHim')»

IncludeCodeTemplate

Include only those paragraphs which contain XpressDox fillpoints

«IncludeCodeTemplate(utils:Help,Text)»

IncludeDataSourceData

Include data from a data source

«IncludeDataSourceData(Contacts,RefreshSave,range=PostalCode > 8000,Customers)»

IncludeFileData

Include data from a text or XML file

«IncludeFileData(Contacts.xml)»

«IncludeFileData(lookups:Contacts.xml,Refresh,Customers)»

IncludeTemplate

Include a template as part of this template

«IncludeTemplate(utils:Clauses,Destination,ExcludeHeaders)»

«IncludeTemplate(utils:Clauses,Destination,PreserveHeaders)»

«IncludeTemplate(utils:Help,Text)»

IncrementDate

Increment a date

«IncrementDate(DateOfBirth,1,'y')»

«IncrementDate('today',5,'d')»

IncrementV

Increment a variable value

«IncrementV('Counter')»

«IncrementV('Total',RenderAsNumeric(Amount))»

InsertFormattedText

Insert text captured as long text

«InsertFormattedText(Address)»

«InsertFormattedText(Address,Paragraph)»

InsertTemplate

Insert a template whose name appears in a data element which is chosen by the user.

«InsertTemplate(Clause,Destination)»

«InsertTemplate(concat('Clauses:',ChosenClauseName,PartyType),Destination)»

«InsertTemplate('Party Underage Clause',Destination)»

«InsertTemplate('letters:Covering Letter',Destination,PreserveHeaders)»

InsertUnformattedLongText

Inserts text captured as “long” text but with no line breaks or formatting

«InsertUnformattedLongText(Address,', ')»

InterviewIsWizard

Specify whether the interview should be in Wizard form or not

«InterviewIsWizard(Yes)»

«InterviewIsWizard(No)»

InterviewTitle

Set the title which will show on the Interview screen for this template

«InterviewTitle(Custom Title for Interview Screen)»

last

Used in a ForEach to test whether the last repeating item is being referenced.

«last()»

«If((position() > 1) and (position() < last()-1))», «End()»«If((position() > 1) and (position() = last()-1))» and «End()»

LinkToDataSource

Link the control for any data element in the interview to a data source

«LinkToDataSource(MatterNumber,Cases)»

«LinkToDataSource(MatterNumber,Cases,RefreshSave,'id=,')»

LinkToOtherData

Links the control in the interview for this data element to a saved dataset

«LinkToOtherData(AccountNumber)»

«LinkToOtherData(AccountNumber,_

List

Produce a delimited list (e.g. commas and ‘and’) from repeating data

«List(Party,Firstname Surname,!, , and )»

«List(Child[Age < 10],Firstname Surname,', ',' and ')»

Max

Gets the higher of two values

«Max(HourlyRate * Hours, 1000)»

«Max(Age,CutoffAge)»

MergePDFForm

Merge a PDF from after the currently running template

«MergePDFForm('Agreement')»

«MergePDFForm(concat('Agreement -',PartyType),'Agreement')»

MergeTemplate

Supply the name of another template to be merged

«MergeTemplate('Agreement')»

«MergeTemplate(concat('Agreement -',PartyType))»

Min

Gets the lower of two values

«Min(HourlyRate * Hours, 1000)»

«Min(Age,CutoffAge)»

Now

Insert the current date (i.e. today) and/or time into the document

«Now('yyyy/MM/dd')»

«Now('MMMM o yyyy')»

«Now('d MMMM yyyy HH:mm:ss','de')»

«Now()»

NumberPhrase

Format a number as words

«NumberPhrase(Price)»

«NumberPhrase(Price - 100,'en-us','ToUpper')»

NumberToCurrency

Render a number as currency, in words

«NumberToCurrency(Price, "Dollar", "Dollars", "cent", "cents", "", "en-uk", "Leave")»

OnExitSet

Set values when focus leaves a data element’s control

«OnExitSet(IDNumber,Gender,DataElement,(Substring(IDNumber,7,1) > '4'),'Male','Female')»

«OnExitSet(PartyType,RefNumber,Caption,(PartyType = 'Individual'),'ID Number','Company Number')»

«OnExitSet(DateOpened,ReminderDate,DataElement,,IncrementDate(DateOpened,7,'d'),,EvenWhenNotEmpty)»

OptimizeParsing

Optimize parsing of the template

«OptimizeParsing(Off)»

«OptimizeParsing(On)»

Ordinal

Ordinal (i.e. First, Second,…) inside ForEach

«Ordinal()»

«Ordinal(,Eerste,Tweede,Derde,Vierde,Fyfde,Sesde,Sewende,Agste en verdere)»

OrdinalSuffix

Gets the suffix st, nd, rd, etc. of the ordinal of a number

«OrdinalSuffix(Today('d'))»

«OrdinalSuffix(Today('d'),'af')»

«OrdinalSuffix(Today('d'),'st,nd,rd,th,th,th,th,th,th,th,th,th,th,th,th,th,th,th,th,th,st,nd,rd,th,th,th,th,th,th')»

Pesos

Render a numeric amount as a number of Pesos, in Spanish words

«Pesos(Price)»

«Pesos(Price,'ToUpper')»

PlaceHolder

A placeholder in the interview to which text can be attached

«PlaceHolder(DummyName)»

Plural

Get the singular or plural depending on the number.

«Plural(count(Child),'child','children')»

«Plural(count(Child),'child!'s','children!'s')»

«ChooseUsingCheckBox(OnlyOne,Y,N,N)»«Plural((OnlyOne = 'Y'),'child','children')»

position

Get the position within a ForEach

«When(position() > 1, and )»

«ForEach(Party)»«PartyFullNames»«If(last() > 1)»«When(position() < last()-1,!, )»«When(position() = last()-1, and )»«End(party > 1)»«End(for each)»

Pounds

Render a numeric amount as a number of Pounds, in words, UK English

«Pounds(Price)»

«Pounds(Price,'ToUpper')»

Rand

Render a numeric amount as a number of Rand in words, in English

«Rand(Price)»

«Rand(Price,'ToUpper')»

RandAfrikaans

Render a numeric amount as a number of Rand in words, Afrikaans

«RandAfrikaans(Price)»

«RandAfrikaans(Price,'ToUpper')»

ReadOnly

Set the control for a data element on the interview to Read Only

«ReadOnly(Description)»

«ReadOnly(Description,Size,Location)»

RegionToX

Convert a number in regional format to XpressDox calculation-compliant format

«(RegionToX(UnitPrice) * RegionToX(Qty))»

RemoveParagraph

Remove the paragraph after the template has merged.

«RemoveParagraph()»

RenderAsNumeric

Force a string to be a valid numeric value

«FormatNumber(RenderAsNumeric(Amount) * 1.10)»

RepeatWhile

Repeat while a condition is true

«SetV('This','XXThat')»«RepeatWhile(GetV('This') != 'That')»Variable 'This' is «GetV('This')» «SetV('This',substring(GetV('This'),2))»«End()»

Replace

Replace all occurrences of a specified string with another

«Replace(EnglishSentence,'grey','gray')»

«Replace(Replace(Replace(EnglishSentence,'grey','gray'),'colour','color'),'favourite','favorite')»

ReplaceField

Replace a Fillpoint in the Base Template

«ReplaceField(Addressee)»«ClientName»«ReplaceFieldEnd()»

«ReplaceField(ToUpper(Addressee))»«ToSentence(ClientName)»«ReplaceFieldEnd()»

Required

Mark a data element as required – must have a non-empty value

«Required(AccountNumber,Decimal)»

«Required(AccountNumber)»

RequiredVersion

Allows the template author to prevent a template running if the installed version of XpressDox is too low.

«RequiredVersion(3.1.1)»

RestrictToLicenses

Supply licence serial numbers for this template

«RestrictToLicenses(123,124,300)»

Round

Round a value to the nearest integer

«FormatNumber(Round(Price,2))»

«Round(InterestRate,3)»

Rule

Applies a custom made validation rule to the data element in the interview process

«Rule(Cost,hard,IsNumeric,110.00,12000.00,The Cost must be greater than 109 and less than or equal to 12000)»

«Rule(SellingPrice,hard,(Area > 1000 and SellingPrice > 500000) or (Area < 1001 and SellingPrice < 50001),'The SellingPrice must be greater than 500000 when the Area is more than 1000.')»

«Rule(IDNumber,hard,IsDigits,The IDNumber must consist only of digits)»«Rule(IDNumber,hard,string-length(IDNumber) = 13,the IDNumber must be exactly 13 digits long)»

«Rule(IDNumber,hard,IsZAIDNumber,The IDNumber failed the test for a valid South African ID Number)»

«Rule(Email,hard,IsEmailAddress,'The field must be a valid email address')»«Rule(Email,hard,(not(contains(Email,',')) and not(contains(Email,';'))),'not a list of addresses')»

«Rule(IDNumber,soft,1 = 1,'do you want to accept the value anyway?')»

RunTemplates

Specify a number of templates to be run when this template is run.

«RunTemplates(CoveringLetter,Contract,Invoice,DebitOrder)»

RunWordMacro

Run a Word macro after the template has been merged.

«RunWordMacro(MacroName)»

«RunWordMacro(FirstMacro,SecondMacro)»

SaveAsPDF

Specify that a merged document must be saved as PDF

«SaveAsPDF(Also)»

«SaveAsPDF(Only)»

«SaveAsPDF(Not)»

SaveAsText

Specify whether or not to save the merged document in plain text format.

«SaveAsText(Yes)»

Script

Define a chunk of document for re-use

«Script(ProductDescription)»chunk of text«ScriptEnd()»

SendWebEmail

Set all the properties to send an email from a Web based template

«SendWebEmail(ToAddress,'','','noreply@email.com','Documents attached for your info','emailbody.html','false','true','false')»

SetCustomDocumentProperty

Sets a custom document property in the merged document.

«SetCustomDocumentProperty(MadeByXpressDox,Y)»

SetDocumentName

Set the document name (referenced as ).

«SetDocumentName(CoveringLetter)»

SetEmptyMarker

Set the value of the Empty Marker

«SetEmptyMarker('{^}')»

«SetEmptyMarker('{^}',LastName,FirstNames,IDNumber)»

«SetEmptyMarker('',LastName,FirstNames,IDNumber)»

SetInitialValue

Sets the initial value for a data element that is to be captured

«SetInitialValue(PostalCode,7890)»

«SetInitialValue(Customer/State,Washington)»

SetInterviewDataOnly

Set the option that a template is destined only for data capture

«SetInterviewDataOnly(Yes)»

«SetInterviewDataOnly(No)»

SetMultipleDocumentFilter

Sets a filter applying to the Document Per Repeated Item feature

«SetMultipleDocumentFilter(ChildAge > 12)»

«SetMultipleDocumentFilter(ChildAge > ../AgeFilterValue)»

SetRepeaterQualifier

Set the string which must appear in the interview against repeating elements

«SetRepeaterQualifier(Child,,

SetSavedDataFileName

Set the file name of the data that was captured in an interview for the template.

«SetSavedDataFileName(Data

SetSavedDataFolder

Sets the folder where the data captured in the interview will be saved.

«SetSavedDataFolder(Data

SetSavedDocumentFileName

Set the file name of the merged document.

«SetSavedDocumentFileName(

SetSavedDocumentFolder

Set the folder where the merged document will be saved.

«SetSavedDocumentFolder(Docs

SetSavedDocumentNameVersioning

Set the option governing the versioning of the merged document file name (default is ON)

«SetSavedDocumentNameVersioning(Off)»

SetV

Set a variable value

«SetV('Balance',0)»

«SetV('Balance',GetV('Balance') + RenderAsNumeric(Amount))»

«IncrementV('Balance', RenderAsNumeric(Amount))»

«ChooseFromRDBList(Gender,Male,Female)»«If(Gender = "Male")»«SetV("PronounHe","he")»«Setv("PronounHim","him")»«SetV("PronounHis","his")»«Else()»«SetV("PronounHe","she")»«SetV("PronounHim","her")»«SetV("PronounHis","her")»«End()»«RemoveParagraph()»
«GetV('PronounHe')» took «GetV('PronounHis')» bag with «GetV('PronounHim')»


«ChooseFromRDBList(PartyGender,Male,Female)»
«Gender(PartyGender,1,'he,she')» took «Gender(PartyGender,1,'his,her')» bag with «Gender(PartyGender,1,'him,her')»

SetVR

Set a variable value and remove the paragraph

«SetVR('Balance',0)»

«SetVr('Balance',GetV('Balance') + RenderAsNumeric(Amount))»

«ChooseFromRDBList(Gender,Male,Female)»«If(Gender = "Male")»«SetVr("PronounHe","he")»«Setv("PronounHim","him")»«SetV("PronounHis","his")»«Else()»«SetVR("PronounHe","she")»«SetV("PronounHim","her")»«SetV("PronounHis","her")»«End()»
«GetV('PronounHe')» took «GetV('PronounHis')» bag with «GetV('PronounHim')»

SetWebButtonText

Sets the text to be shown in the "Assemble Document" button on the web interview

«SetWebButtonText(Submit)»

SetWebReturnURL

Set the return URL for a web-based template

«SetWebReturnURL('www.MyLawFirm.com/DocumentCompleted.aspx')»

«SetWebReturnURL('www.MyLawFirm.com/DocumentCompleted.php?userID=131234&activity=LoanApplication')»

«SetWebReturnURL('www.MyLawFirm.com/DocumentCompleted.php?userID=&activity=LoanApplication')»

ShowFormattedMarkerWhenEmpty

Show the Empty Marker, with data element name formatted into it

«ShowFormattedMarkerWhenEmpty(ToUpper(Name),'Name')»

ShowIfHasValue

Show the item only if it has a non-empty value

«ShowIfHasValue(AddressLine3)»

«ShowIfHasValue(ToUpper(AddressLine3))»

ShowMarkerWhenEmpty

Show the Empty Marker

«ShowMarkerWhenEmpty(ToUpper(Name))»

«ShowMarkerWhenEmpty(ToUpper(Name),'[*]')»

StartsWith

Test whether a string starts with a given string

«If(StartsWith(ProductName,'Microsoft'))»Good quality inside«End()»

StartsWithVowel

Test whether a string starts with a vowel

«When(StartsWithVowel(Fruit),an,a)»

«When(StartsWithVowel(Accomodation,'Hh'),an,a)»

string-length

Returns the number of characters in a value

«If(string-length(AddressLine3) > 0)»
«AddressLine3»
«End()»

substring

Extract a portion of a string

«substring(Name,5)»

«substring(GetV('description'),1,string-length(GetV('name')))»

substring-after

Extract the substring after a given string

«substring-after(Surname,'-')»

substring-before

Extract the substring before a given string

«substring-before(Initials,'.')»

sum

Calculate the sum of values

«FormatNumber(sum(InvoiceLine/Amount))»

Tab

Add a tab to the main panel of the interview screen

«Tab(Financial Information,Capital,InterestRate,InterestDate,AmountPaid)»

TableLookup

Calculate a value from a table

«TableLookup(CapitalAmount,'3001;56;0,5001;187;0,9999999;277;0')»

«TableLookup(AnnualIncome,'122500;0;18,195000;21960;25,270000;40210;30,999999999;143010;40')»

Today

Insert the current date into the document

«Today('yyyy/MM/dd')»

«Today('MMMM o yyyy')»

«Today()»

ToLower

Convert to lower case

«ToLower(Name)»

«ToLower(Name,1)»

«ToLower(Name,2,0)»

«ToLower(Name,3,2)»

ToSentence

Convert to Sentence case

«ToSentence(Surname)»

ToTitle

Convert to Title Case

«ToTitle(BookTitle)»

ToUpper

Convert to UPPER case

«ToUpper(Name)»

«ToUpper(Name,1,1)»

«ToUpper(Name,2,0)»

«ToUpper(Name,3,2)»

Trim

Removes white space from either side of a string

«FormatNumber(Trim(Amount))»

UseScript

Insert the contents of a script defined in another part of the template.

«UseScript(ProductDescription)»

When

Provide condition for including small text values (e.g. for gender or plural handling)

«When(Gender = 'M',he,she)»

«When(count(Child) = 1,child,children)»

«When(StartsWithVowel(Fruit),an,a)» «Fruit»

WindowsLogonUser

Returns the user name with which the current user logged on to Windows

«WindowsLogonUser()»

«SetSavedDocumentFolder(Docs

XToRegion

Convert a number in calculation-compliant format to regional settings format

«FormatNumber(XToRegion(RegionToX(UnitPrice) * RegionToX(Qty)),'','EU')»

YearsBetween

Gets the number of years between two dates

«Round(YearsBetween(Today(),DateOfBirth) – 0.5)»

Back to top »

 

Categorized Command ListCategorized List of Commands and Functions

Conditional Commands and Functions    Conditional Commands and Functions

Command or Function Name Description and Examples
contains

Test for a substring inside another string

«If(contains(Word,'q'))»the word contains 'q'.«End()»

count

Count - returns the number of a repeated item

«If(count(Child) > 0)»The number of children in the family is «count(Child)»«End()»

«If(count(Child) > 0)»The names of the children follow:«Foreach(Child)»«Name» «Surname»«End()»«End()»

«count(Child[Age < 12])»

EndsWith

Test whether a string ends in a given string

«If(EndsWith(Surname,'-Smith'))»

If

Conditionally include text into the document

«If(Answer = 'No')» «End(If)»

«If(Answer = 'Yes')»text when Answer is 'Yes'«Else()»text when Answer is not 'Yes'«End(If)»

«If((Answer = 'Yes') or (Answer = 'Maybe') and (Amount > 500)»«End()»

«If(position()= 1)»This applies only to the first repeating item.«End()»

«ForEach(Party)»«PartyFullNames»«If(last() > 1)»«When(position() < last()-1,!, )»«When(position() = last()-1, and )»«End(party > 1)»«End(for each)»

«ChooseFromRDBList(Gender,Male,Female)»«If(Gender = "Male")»«SetV("PronounHe","he")»«Setv("PronounHim","him")»«SetV("PronounHis","his")»«Else()»«SetV("PronounHe","she")»«SetV("PronounHim","her")»«SetV("PronounHis","her")»«End()»«RemoveParagraph()»
«GetV('PronounHe')» took «GetV('PronounHis')» bag with «GetV('PronounHim')»

ShowIfHasValue

Show the item only if it has a non-empty value

«ShowIfHasValue(AddressLine3)»

«ShowIfHasValue(ToUpper(AddressLine3))»

StartsWith

Test whether a string starts with a given string

«If(StartsWith(ProductName,'Microsoft'))»Good quality inside«End()»

StartsWithVowel

Test whether a string starts with a vowel

«When(StartsWithVowel(Fruit),an,a)»

«When(StartsWithVowel(Accomodation,'Hh'),an,a)»

string-length

Returns the number of characters in a value

«If(string-length(AddressLine3) > 0)»
«AddressLine3»
«End()»

When

Provide condition for including small text values (e.g. for gender or plural handling)

«When(Gender = 'M',he,she)»

«When(count(Child) = 1,child,children)»

«When(StartsWithVowel(Fruit),an,a)» «Fruit»

Data Capture (Interview) Commands and Functions    Data Capture (Interview) Commands and Functions

Command or Function Name Description and Examples
AlignCaptions

Sets whether captions on the interview should be aligned left or right

«AlignCaptions(Left)»

«AlignCaptions(Right)»

Caption

Set the caption for the data element on the interview screen

«Caption(Amount,Capital amount of loan)»

«Caption(Amount,^bu^@Navy@Capital amount of loan)»

CaptureAllDataElements

Capture all data elements even if not used in this template

«CaptureAllDataElements(Yes)»

CaptureAsLongText

Capture a multi-line text values

«CaptureAsLongText(Address,3)»

CaptureDataElement

Places a control for the data element on the interview screen

«CaptureDataElement(Name)»

«CaptureDataElement(DateOfBirth,date)»

CaptureLater

Defer the capture of a data element to later in the interview

«CaptureLater(Name)»

CaptureOnlyEmptyValues

Specify whether only empty values should be shown in the interview

«CaptureOnlyEmptyValues(Yes)»

«CaptureOnlyEmptyValues(No)»

ChooseFromData

Choose from repeating data already in the data set

«ChooseFromData(IdOfOrder,Order/OrderID)»

«ChooseFromData(IdOfOrder,Order/OrderID,OrderDescription)»

ChooseFromDataElements

Choose from data already in the data set

«ChooseFromDataElements(CustodianName,../Respondent1,../Respondent2)»

ChooseFromList

Present the user with a list of choices in a drop down list

«ChooseFromList(Province,Ontario,Quebec,British Columbia,Alberta,Manitoba,Saskatchewan,Nova Scotia,New Brunswick,Newfoundland and Labrador,Prince Edward Island)»

«ChooseFromList(Province,,Ontario,Quebec,'British Columbia', 'Alberta' ,Manitoba,Saskatchewan,Nova Scotia,New Brunswick,'Newfoundland and Labrador',Prince Edward Island)»

«ChooseFromList(Province,O~~Ontario,Q~~Quebec,BC~~British Columbia,A~~Alberta,M~~Manitoba,S~~Saskatchewan,NS~~Nova Scotia,NB~~New Brunswick,NL~~Newfoundland and Labrador,PE~~Prince Edward Island)»

ChooseFromRDBList

Present a radio button list of choices

«ChooseFromRDBList(Orientation,North,South,East,West)»

«ChooseFromRDBList(Clause,Security~~The undersigned undertakes to provide security covering the loan to be granted.,NoSecurity~~The undersigned is not required to provide security for the loan.)»

«ChooseFromRDBList(Clause,~~The undersigned undertakes to provide security covering the loan to be granted.,~~The undersigned is not required to provide security for the loan.)»

ChooseFromRepeatingData

Choose from repeating data already in the data set

«ChooseFromRepeatingData(IdOfOrder,Order/OrderID)»

«ChooseFromRepeatingData(IdOfOrder,Order/OrderID,OrderDescription)»

ChooseFromSamples

Presents a drop down list of choices, but the user can type their own if it is not in the list

«ChooseFromSamples(Title,,Mr.,Mrs.,Miss,Ms.,Prof.,Dr.)»

ChooseUsingCheckBox

Choose a value using a check box

«ChooseUsingCheckBox(RequiresSpecialSchooling,Yes,No,No)»

«ChooseUsingCheckBox(Clause,~~The Parties agree to cede their rights to various assets without prejudice.)»
«If(Clause != '')»
«Clause»
«End()»

ChooseUsingDatePicker

Choose a data element value using a date picker

«ChooseUsingDatePicker(DateOpened)»

Define

Define the interview properties of a data element

«Define(Amount,^biu^@Red@Caption text,|^b^@Navy@Heading text,Footing Text,Tab Caption,CaptureDataElement,,Required,Initial Value,hard;IsDigits;The amount must be numerics only.,Cases;RefreshSave;'Id=;')?Enter the amount of the deal.»

«Define(Title,^biu^@Red@Title of the party,|^b^@Navy@PARTY DETAILS,,Contact Information,ChooseFromList,;Mr.;Mrs.;Ms.;Dr.;Prof.)»

«Define(TaxIncluded,Is Tax included,,,,ChooseUsingCheckBox,Y;N;N)»

ExcludeFromIV

Excludes a data element from the capture interview for the template

«ExcludeFromIV(FirmName)»

«ExcludeFromIV(FirmName,FirmAddressLine1,FirmAddressLine2,FirmPostalCode)»

Footing

Place footing text below a data element in the interview

«Footing(CompanyName,)»

«Footing(CompanyPostalCode,|^bu^@Navy@END OF COMPANY DETAILS)»

Heading

Place heading text above a data element in the interview

«Heading(CompanyName, COMPANY DETAILS)»

«Heading(CompanyName,|^bu^@Navy@COMPANY DETAILS)»

Help

Provide help text (to be shown in the Help area) for a data element

«Help(Amount,Enter the amount of the loan)»

HideEmptyInterview

Specify whether or not an empty interview should be hidden

«HideEmptyInterview(Yes)»

«HideEmptyInterview(No)»

Hyperlink

Attach a hyperlink to a heading or footing

«Hyperlink(Description,Heading,www.xpressdox.com)»

«Hyperlink(Description,Heading,www.xpressdox.com/

InterviewIsWizard

Specify whether the interview should be in Wizard form or not

«InterviewIsWizard(Yes)»

«InterviewIsWizard(No)»

InterviewTitle

Set the title which will show on the Interview screen for this template

«InterviewTitle(Custom Title for Interview Screen)»

OnExitSet

Set values when focus leaves a data element's control

«OnExitSet(IDNumber,Gender,DataElement,(Substring(IDNumber,7,1) > '4'),'Male','Female')»

«OnExitSet(PartyType,RefNumber,Caption,(PartyType = 'Individual'),'ID Number','Company Number')»

«OnExitSet(DateOpened,ReminderDate,DataElement,,IncrementDate(DateOpened,7,'d'),,EvenWhenNotEmpty)»

OptimizeParsing

Optimize parsing of the template

«OptimizeParsing(Off)»

«OptimizeParsing(On)»

PlaceHolder

A placeholder in the interview to which text can be attached

«PlaceHolder(DummyName)»

ReadOnly

Set the control for a data element on the interview to Read Only

«ReadOnly(Description)»

«ReadOnly(Description,Size,Location)»

Required

Mark a data element as required - must have a non-empty value

«Required(AccountNumber,Decimal)»

«Required(AccountNumber)»

Rule

Applies a custom made validation rule to the data element in the interview process

«Rule(Cost,hard,IsNumeric,110.00,12000.00,The Cost must be greater than 109 and less than or equal to 12000)»

«Rule(SellingPrice,hard,(Area > 1000 and SellingPrice > 500000) or (Area < 1001 and SellingPrice < 50001),'The SellingPrice must be greater than 500000 when the Area is more than 1000.')»

«Rule(IDNumber,hard,IsDigits,The IDNumber must consist only of digits)»«Rule(IDNumber,hard,string-length(IDNumber) = 13,the IDNumber must be exactly 13 digits long)»

«Rule(IDNumber,hard,IsZAIDNumber,The IDNumber failed the test for a valid South African ID Number)»

«Rule(Email,hard,IsEmailAddress,'The field must be a valid email address')»«Rule(Email,hard,(not(contains(Email,',')) and not(contains(Email,';'))),'not a list of addresses')»

«Rule(IDNumber,soft,1 = 1,'do you want to accept the value anyway?')»

SetInitialValue

Sets the initial value for a data element that is to be captured

«SetInitialValue(PostalCode,7890)»

«SetInitialValue(Customer/State,Washington)»

SetInterviewDataOnly

Set the option that a template is destined only for data capture

«SetInterviewDataOnly(Yes)»

«SetInterviewDataOnly(No)»

SetRepeaterQualifier

Set the string which must appear in the interview against repeating elements

«SetRepeaterQualifier(Child,,

Tab

Add a tab to the main panel of the interview screen

«Tab(Financial Information,Capital,InterestRate,InterestDate,AmountPaid)»

Data Sources Commands and Functions    Data Sources Commands and Functions

Command or Function Name Description and Examples
ChooseFromDataSource

Choose a row from a data source

«ChooseFromDataSource(Contacts,Choose a Contact)»

«ChooseFromDataSource(Contacts,Type in the Contact's ID,RefreshSave,,DisallowSearch)»

ChooseFromFile

Choose data from a text or XML file

«ChooseFromFile(Lookups:Contacts.xdtxt,Choose a contact,NoRefresh,Surname)»

«ChooseFromFile(Lookups:Contacts.xdtxt,Choose the Borrower,NoRefresh,BorrowerSurname,Borrower)»

IncludeDataSourceData

Include data from a data source

«IncludeDataSourceData(Contacts,RefreshSave,range=PostalCode > 8000,Customers)»

IncludeFileData

Include data from a text or XML file

«IncludeFileData(Contacts.xml)»

«IncludeFileData(lookups:Contacts.xml,Refresh,Customers)»

LinkToDataSource

Link the control for any data element in the interview to a data source

«LinkToDataSource(MatterNumber,Cases)»

«LinkToDataSource(MatterNumber,Cases,RefreshSave,'id=,')»

LinkToOtherData

Links the control in the interview for this data element to a saved dataset

«LinkToOtherData(AccountNumber)»

«LinkToOtherData(AccountNumber,_

Formatting Dates Commands and Functions    Formatting Dates Commands and Functions

Command or Function Name Description and Examples
DaysBetween

Gets the number of days between two dates

«DaysBetween(EndDate,StartDate)»

«FormatNumber(((DaysBetween(Today(),DateOfBirth) div 365) - 0.5), '0')»

FormatDate

Format a field as date and/or time

«FormatDate(DateOfBirth,'yyyy/MM/dd','en')»

«FormatDate(SignatureDate,'o MMMM yyyy')»

IncrementDate

Increment a date

«IncrementDate(DateOfBirth,1,'y')»

«IncrementDate('today',5,'d')»

Now

Insert the current date (i.e. today) and/or time into the document

«Now('yyyy/MM/dd')»

«Now('MMMM o yyyy')»

«Now('d MMMM yyyy HH:mm:ss','de')»

«Now()»

Today

Insert the current date into the document

«Today('yyyy/MM/dd')»

«Today('MMMM o yyyy')»

«Today()»

YearsBetween

Gets the number of years between two dates

«Round(YearsBetween(Today(),DateOfBirth) – 0.5)»

Formatting Numbers Commands and Functions    Formatting Numbers Commands and Functions

Command or Function Name Description and Examples
CurrencySymbol

Insert the currency symbol as defined in the Regional Settings

«CurrencySymbol()»

Dolares

Render a numeric amount as a number of Dollars, in Spanish words

«Dolares(Price)»

«Dolares(Price,'ToUpper')»

Dollars

Render a numeric amount as a number of Dollars, in words

«Dollars(Price)»

«Dollars(Price,'ToUpper')»

DollarsFrancaise

Render a numeric amount as a number of Dollars, in French words

«DollarsFrancaise(Price)»

«DollarsFrancaise(Price,'ToLower')»

EuroDeutsch

Render a numeric amount as a number of Euros, in German words

«EuroDeutsch(Price)»

«EuroDeutsch(Price,'ToLower')»

EurosEspanol

Render a numeric amount as a number of Euros, in Spanish words

«EurosEspanol(Price)»

«EurosEspanol(Price,'ToUpper')»

EurosFrancaise

Render a numeric amount as a number of Euros, in French words

«EurosFrancaise(Price)»

«EurosFrancaise(Price,'ToLower')»

FormatNumber

Format Number

«FormatNumber(Amount)»

«FormatNumber(Amount,'#,0.00;(#,0.00)')»

«FormatNumber(Amount,'#,0.00;(#,0.00)','FR')»

GetListItem

Extract a value from a delimited list

«GetListItem(ListItem,'First,Second,Third',',')»

«GetListItem(4,IP_Address,'.')»

«GetListItem(GetV('element number'),PeriodicTable,',')»

Max

Gets the higher of two values

«Max(HourlyRate * Hours, 1000)»

«Max(Age,CutoffAge)»

Min

Gets the lower of two values

«Min(HourlyRate * Hours, 1000)»

«Min(Age,CutoffAge)»

NumberPhrase

Format a number as words

«NumberPhrase(Price)»

«NumberPhrase(Price - 100,'en-us','ToUpper')»

NumberToCurrency

Render a number as currency, in words

«NumberToCurrency(Price, "Dollar", "Dollars", "cent", "cents", "", "en-uk", "Leave")»

OrdinalSuffix

Gets the suffix st, nd, rd, etc. of the ordinal of a number

«OrdinalSuffix(Today('d'))»

«OrdinalSuffix(Today('d'),'af')»

«OrdinalSuffix(Today('d'),'st,nd,rd,th,th,th,th,th,th,th,th,th,th,th,th,th,th,th,th,th,st,nd,rd,th,th,th,th,th,th')»

Pesos

Render a numeric amount as a number of Pesos, in Spanish words

«Pesos(Price)»

«Pesos(Price,'ToUpper')»

Pounds

Render a numeric amount as a number of Pounds, in words, UK English

«Pounds(Price)»

«Pounds(Price,'ToUpper')»

Rand

Render a numeric amount as a number of Rand in words, in English

«Rand(Price)»

«Rand(Price,'ToUpper')»

RandAfrikaans

Render a numeric amount as a number of Rand in words, Afrikaans

«RandAfrikaans(Price)»

«RandAfrikaans(Price,'ToUpper')»

RegionToX

Convert a number in regional format to XpressDox calculation-compliant format

«(RegionToX(UnitPrice) * RegionToX(Qty))»

Round

Round a value to the nearest integer

«FormatNumber(Round(Price,2))»

«Round(InterestRate,3)»

sum

Calculate the sum of values

«FormatNumber(sum(InvoiceLine/Amount))»

TableLookup

Calculate a value from a table

«TableLookup(CapitalAmount,'3001;56;0,5001;187;0,9999999;277;0')»

«TableLookup(AnnualIncome,'122500;0;18,195000;21960;25,270000;40210;30,999999999;143010;40')»

XToRegion

Convert a number in calculation-compliant format to regional settings format

«FormatNumber(XToRegion(RegionToX(UnitPrice) * RegionToX(Qty)),'','EU')»

Formatting Strings Commands and Functions    Formatting Strings Commands and Functions

Command or Function Name Description and Examples
Chr

Get a character value from its integer representation

«OnExitSet(AddressLine2,AddressBlock,Value,,concat(AddressLine1,Chr(13),AddressLine2),,EvenWhenNotEmpty)»

CountOf

Get the number of occurrences of one string inside another

«CountOf('.',Name)»

«If(CountOf('.',Name) = 0)»The name contains no initials.«End()»

EscapeForXml

Escape a string for use in XML

«EscapeForXml(Text)»

ExtractInitials

Extract Initials from name

«ExtractInitials(Fullnames,'.')»

«ExtractInitials(Fullnames,'')»

Gender

Return a value depending on a party's gender


«ChooseFromRDBList(PartyGender,Male,Female)»
«Gender(PartyGender,1,'he,she')» took «Gender(PartyGender,1,'his,her')» bag with «Gender(PartyGender,1,'him,her')»


«ChooseFromRDBList(PartyGender,,Y~~Male,X~~Female)»«Comment(Y and X are accepted as gender codes from genetics)»
«Gender(PartyGender,1,'he,she,it')» took «Gender(PartyGender,1,'his,her,its')» bag with «Gender(PartyGender,1,'him,her,it')»


«ForEach(Party)»«ChooseFromRDBList(PartyGender,Male,Female,Neuter)»«End(ForEach party)»
«Gender(Party/PartyGender,count(Party),'he,she,it,they')» took «Gender(Party/PartyGender,count(Party),'his,her,its,their')» bag«Plural(count(Party),'','s')» with «Gender(Party/PartyGender,count(Party),'him,her,it,them')»


«ChooseUsingCheckBox(OnlyOneParty,Y,N,N)»
«Gender(PartyGender,(OnlyOneParty = 'Y'),'he,she,it,they')» took «Gender(PartyGender,(OnlyOneParty = 'Y'),'his,her,its,their')» bag«Plural((OnlyOneParty = 'Y'),'','s')» with «Gender(PartyGender,(OnlyOneParty = 'Y'),'him,her,it,them')»


«ForEach(Party)»«ChooseFromRDBList(PartyGender,M,V,D)»«End(ForEach party)»
«Gender(Party/PartyGender,count(Party),'hy,sy,die ding,hulle','M,V,D')» het «Gender(Party/PartyGender,count(Party),'sy,haar,sy,hulle','M,V,D')» sak«Plural(count(Party),'','ke')» saam met «Gender(Party/PartyGender,count(Party),'hom,haar,hom,hulle','M,V,D')» gevat.

GetValidFileName

Get a string which only has valid file name characters

«GetValidFileName(AccountNumber)»

«GetValidFileName(AccountNumber,'-')»

«CreateDataElement('TargetFileName',GetValidFileName(AccountNumber,'-'))»

GetValidXmlElementName

Converts the passed string to a valid XML element name

«GetValidXmlElementName(Name,'_and_')»

HardSpace

Convert normal spaces to non-breaking spaces

«HardSpace(Phrase)»

«HardSpace(Pounds(Price))»

InsertFormattedText

Insert text captured as long text

«InsertFormattedText(Address)»

«InsertFormattedText(Address,Paragraph)»

InsertUnformattedLongText

Inserts text captured as "long" text but with no line breaks or formatting

«InsertUnformattedLongText(Address,', ')»

List

Produce a delimited list (e.g. commas and 'and') from repeating data

«List(Party,Firstname Surname,!, , and )»

«List(Child[Age < 10],Firstname Surname,', ',' and ')»

Plural

Get the singular or plural depending on the number.

«Plural(count(Child),'child','children')»

«Plural(count(Child),'child!'s','children!'s')»

«ChooseUsingCheckBox(OnlyOne,Y,N,N)»«Plural((OnlyOne = 'Y'),'child','children')»

RenderAsNumeric

Force a string to be a valid numeric value

«FormatNumber(RenderAsNumeric(Amount) * 1.10)»

Replace

Replace all occurrences of a specified string with another

«Replace(EnglishSentence,'grey','gray')»

«Replace(Replace(Replace(EnglishSentence,'grey','gray'),'colour','color'),'favourite','favorite')»

SetEmptyMarker

Set the value of the Empty Marker

«SetEmptyMarker('{^}')»

«SetEmptyMarker('{^}',LastName,FirstNames,IDNumber)»

«SetEmptyMarker('',LastName,FirstNames,IDNumber)»

ShowFormattedMarkerWhenEmpty

Show the Empty Marker, with data element name formatted into it

«ShowFormattedMarkerWhenEmpty(ToUpper(Name),'Name')»

ShowMarkerWhenEmpty

Show the Empty Marker

«ShowMarkerWhenEmpty(ToUpper(Name))»

«ShowMarkerWhenEmpty(ToUpper(Name),'[*]')»

substring

Extract a portion of a string

«substring(Name,5)»

«substring(GetV('description'),1,string-length(GetV('name')))»

substring-after

Extract the substring after a given string

«substring-after(Surname,'-')»

substring-before

Extract the substring before a given string

«substring-before(Initials,'.')»

ToLower

Convert to lower case

«ToLower(Name)»

«ToLower(Name,1)»

«ToLower(Name,2,0)»

«ToLower(Name,3,2)»

ToSentence

Convert to Sentence case

«ToSentence(Surname)»

ToTitle

Convert to Title Case

«ToTitle(BookTitle)»

ToUpper

Convert to UPPER case

«ToUpper(Name)»

«ToUpper(Name,1,1)»

«ToUpper(Name,2,0)»

«ToUpper(Name,3,2)»

Trim

Removes white space from either side of a string

«FormatNumber(Trim(Amount))»

WindowsLogonUser

Returns the user name with which the current user logged on to Windows

«WindowsLogonUser()»

«SetSavedDocumentFolder(Docs

Miscellaneous Commands and Functions    Miscellaneous Commands and Functions

Command or Function Name Description and Examples
Comment

Places a comment into the template

«Comment(Any arbitrary comments)»

Debug

Debug missing or superfluous 'end' and 'else' issues

«Debug()»

ExcludeFromDataSet

Exclude elements from the saved dataset

«ExcludeFromDataSet(DataElements,UserID,UserName,UserEmail,Child/Address)»

«ExcludeFromDataSet(DataSources,Users,Accounts)»

RequiredVersion

Allows the template author to prevent a template running if the installed version of XpressDox is too low.

«RequiredVersion(3.1.1)»

RestrictToLicenses

Supply licence serial numbers for this template

«RestrictToLicenses(123,124,300)»

RunTemplates

Specify a number of templates to be run when this template is run.

«RunTemplates(CoveringLetter,Contract,Invoice,DebitOrder)»

SetMultipleDocumentFilter

Sets a filter applying to the Document Per Repeated Item feature

«SetMultipleDocumentFilter(ChildAge > 12)»

«SetMultipleDocumentFilter(ChildAge > ../AgeFilterValue)»

Post Merge Commands and Functions    Post Merge Commands and Functions

Command or Function Name Description and Examples
RunWordMacro

Run a Word macro after the template has been merged.

«RunWordMacro(MacroName)»

«RunWordMacro(FirstMacro,SecondMacro)»

SaveAsPDF

Specify that a merged document must be saved as PDF

«SaveAsPDF(Also)»

«SaveAsPDF(Only)»

«SaveAsPDF(Not)»

SaveAsText

Specify whether or not to save the merged document in plain text format.

«SaveAsText(Yes)»

SetCustomDocumentProperty

Sets a custom document property in the merged document.

«SetCustomDocumentProperty(MadeByXpressDox,Y)»

SetDocumentName

Set the document name (referenced as ).

«SetDocumentName(CoveringLetter)»

SetSavedDataFileName

Set the file name of the data that was captured in an interview for the template.

«SetSavedDataFileName(Data

SetSavedDataFolder

Sets the folder where the data captured in the interview will be saved.

«SetSavedDataFolder(Data

SetSavedDocumentFileName

Set the file name of the merged document.

«SetSavedDocumentFileName(

SetSavedDocumentFolder

Set the folder where the merged document will be saved.

«SetSavedDocumentFolder(Docs

SetSavedDocumentNameVersioning

Set the option governing the versioning of the merged document file name (default is ON)

«SetSavedDocumentNameVersioning(Off)»

Repeating Commands and Functions    Repeating Commands and Functions

Command or Function Name Description and Examples
ForEach

Repeat for a number of repeating data elements

«ForEach(Party)» «End()»

«ForEach(Party,Surname,ascending,text)» «End(for each)»

«ForEach(Child[Age < 12]) selects children whose age is less than 12» «End()»

last

Used in a ForEach to test whether the last repeating item is being referenced.

«last()»

«If((position() > 1) and (position() < last()-1))», «End()»«If((position() > 1) and (position() = last()-1))» and «End()»

Ordinal

Ordinal (i.e. First, Second,...) inside ForEach

«Ordinal()»

«Ordinal(,Eerste,Tweede,Derde,Vierde,Fyfde,Sesde,Sewende,Agste en verdere)»

position

Get the position within a ForEach

«When(position() > 1, and )»

«ForEach(Party)»«PartyFullNames»«If(last() > 1)»«When(position() < last()-1,!, )»«When(position() = last()-1, and )»«End(party > 1)»«End(for each)»

RepeatWhile

Repeat while a condition is true

«SetV('This','XXThat')»«RepeatWhile(GetV('This') != 'That')»Variable 'This' is «GetV('This')» «SetV('This',substring(GetV('This'),2))»«End()»

Templates Commands and Functions    Templates Commands and Functions

Command or Function Name Description and Examples
BaseTemplate

Base (or overlay) this template on another template

«BaseTemplate(LetterHead)»

«BaseTemplate(headings:LetterHead,Destination)»

ComeHereAfterRun

Place a marker in the template where the cursor should be after the template has run.

«ComeHereAfterRun()»

DocumentBody

Insert the body of the originating template into the Base Template

«DocumentBody»

IncludeCodeTemplate

Include only those paragraphs which contain XpressDox fillpoints

«IncludeCodeTemplate(utils:Help,Text)»

IncludeTemplate

Include a template as part of this template

«IncludeTemplate(utils:Clauses,Destination,ExcludeHeaders)»

«IncludeTemplate(utils:Clauses,Destination,PreserveHeaders)»

«IncludeTemplate(utils:Help,Text)»

InsertTemplate

Insert a template whose name appears in a data element which is chosen by the user.

«InsertTemplate(Clause,Destination)»

«InsertTemplate(concat('Clauses:',ChosenClauseName,PartyType),Destination)»

«InsertTemplate('Party Underage Clause',Destination)»

«InsertTemplate('letters:Covering Letter',Destination,PreserveHeaders)»

MergePDFForm

Merge a PDF from after the currently running template

«MergePDFForm('Agreement')»

«MergePDFForm(concat('Agreement -',PartyType),'Agreement')»

MergeTemplate

Supply the name of another template to be merged

«MergeTemplate('Agreement')»

«MergeTemplate(concat('Agreement -',PartyType))»

ReplaceField

Replace a Fillpoint in the Base Template

«ReplaceField(Addressee)»«ClientName»«ReplaceFieldEnd()»

«ReplaceField(ToUpper(Addressee))»«ToSentence(ClientName)»«ReplaceFieldEnd()»

Script

Define a chunk of document for re-use

«Script(ProductDescription)»chunk of text«ScriptEnd()»

UseScript

Insert the contents of a script defined in another part of the template.

«UseScript(ProductDescription)»

Variables Commands and Functions    Variables Commands and Functions

Command or Function Name Description and Examples
concat

Concatenates any number of string values

«SetV('FullName',concat(FirstNames,' ',Surname))»

«SetV('Possessive',concat(Noun,'!'s'))»

CreateDataElement

Create a data element in the template's data set.

«CreateDataElement('ThisDataElement',GetV('ThisVariable')»

«CreateDataElement('ThisFileName'),GetValidFileName(AccountNumber)»

GetV

Get the value of a variable

«GetV('Balance')»

GetVn

Get the value of a variable used as numeric

«Party[GetVn('Counter')]/Name»

IncrementV

Increment a variable value

«IncrementV('Counter')»

«IncrementV('Total',RenderAsNumeric(Amount))»

RemoveParagraph

Remove the paragraph after the template has merged.

«RemoveParagraph()»

SetV

Set a variable value

«SetV('Balance',0)»

«SetV('Balance',GetV('Balance') + RenderAsNumeric(Amount))»

«IncrementV('Balance', RenderAsNumeric(Amount))»

«ChooseFromRDBList(Gender,Male,Female)»«If(Gender = "Male")»«SetV("PronounHe","he")»«Setv("PronounHim","him")»«SetV("PronounHis","his")»«Else()»«SetV("PronounHe","she")»«SetV("PronounHim","her")»«SetV("PronounHis","her")»«End()»«RemoveParagraph()»
«GetV('PronounHe')» took «GetV('PronounHis')» bag with «GetV('PronounHim')»


«ChooseFromRDBList(PartyGender,Male,Female)»
«Gender(PartyGender,1,'he,she')» took «Gender(PartyGender,1,'his,her')» bag with «Gender(PartyGender,1,'him,her')»

SetVR

Set a variable value and remove the paragraph

«SetVR('Balance',0)»

«SetVr('Balance',GetV('Balance') + RenderAsNumeric(Amount))»

«ChooseFromRDBList(Gender,Male,Female)»«If(Gender = "Male")»«SetVr("PronounHe","he")»«Setv("PronounHim","him")»«SetV("PronounHis","his")»«Else()»«SetVR("PronounHe","she")»«SetV("PronounHim","her")»«SetV("PronounHis","her")»«End()»
«GetV('PronounHe')» took «GetV('PronounHis')» bag with «GetV('PronounHim')»

Web Commands and Functions    Web Commands and Functions

Command or Function Name Description and Examples
SendWebEmail

Set all the properties to send an email from a Web based template

«SendWebEmail(ToAddress,'','','noreply@email.com','Documents attached for your info','emailbody.html','false','true','false')»

SetWebButtonText

Sets the text to be shown in the "Assemble Document" button on the web interview

«SetWebButtonText(Submit)»

SetWebReturnURL

Set the return URL for a web-based template

«SetWebReturnURL('www.MyLawFirm.com/DocumentCompleted.aspx')»

«SetWebReturnURL('www.MyLawFirm.com/DocumentCompleted.php?userID=131234&activity=LoanApplication')»

«SetWebReturnURL('www.MyLawFirm.com/DocumentCompleted.php?userID=&activity=LoanApplication')»

Back to top »