Related topics:


Tutorial Videos

Tutorial videos are available here.

Knowledge Base

Visit our User Forum for discussions & solutions

Examples of Scripts as Functions – XpressDox

Parameterized scripts assist with the re-use of XpressDox code

Here are some examples of Scripts which may be useful:


Write out a full name from individual data elements:

«concat(SuffixWith(&FirstName&,’ ‘),SuffixWith(&MiddleName&,' '),&LastName&)»

The SuffixWith() functions will ensure that the names are suffixed with spaces only if those data elements are given values. If left blank, no spaces will be added.


Use the full name in another fillpoint:

Here we will use the FullName script to gather information about the Plaintiff, and then display the full name of the Plaintiff on the interview in some Footing text.

«Footing(Plaintiff_Last,@Blue/Microsoft Sans Serif/12@            )»«Comment(this defines the style of the footing)»
«Footing(Plaintiff_Last,Enter the address details for <FullName(Plaintiff_First,Plaintiff_Middle,Plaintiff_Last)||[Plaintiff]> below)»

Giving us something that looks like this in the interview screen:

XpressDox Document Automation Software interview



Now add the address:

In a single line:

«SuffixWith(&Add1&,’, ‘)»«SuffixWith(&Add2&,’, ‘)»«&City&», «&State&» «&Zip&»


Over multiple lines:

«&City&», «&State&» «&Zip&»


Now call the address scripts:


And because they are the same data elements, they will only appear once on the interview, but will appear in different ways on the resultant document.

XpressDox Document Automation Software template and document


Use the same scripts multiple times in the template:

Because the scripts are parameterized, it means they can be used multiple times for different parties.


Here the same script (FullName) has been used but for 3 different parties; the Plaintiff, the Defendant and the Attorney.

XpressDox Document Automation Software template and document. Reuse text.



And with just a few tweaks to the interview e.g. Tabs / Headings / Captions, the user experience can be improved.

You could even choose to do some of that in scripts as well.

«Heading(&First&,  )»«Comment(Insert a blank space on the interview)»

«AddHeadingText(Plaintiff_First,PLAINTIFF DETAILS)»
«AddHeadingText(Defendant_First,DEFENDANT DETAILS)»
«AddHeadingText(Attorney_First,ATTORNEY DETAILS)»

XpressDox Document Automation Software template and document. Interview with tabs


When coding like this, in reusable scripts, should something need to change e.g. the style of the heading, it is easy to make the change only once in the script definition. The change is then applied to all the places where the script is called.