HotDocs Author WorkflowCreate a template Add placeholders Group variables in dialogs Upload a template Create a script

FIRST Function

The FIRST function returns the number of characters you specify from the beginning of the text string you specify.

You use this function when you need to know the first part of a text value, such as when you want to use only the first initial of a client's name in a document.

Function Attributes Details
Function name FIRST
Usage model FIRST ( in:TEXT, count:NUM )
Parameters This function requires you to replace two parameters:

in: TEXT

The function returns some of the first characters in the Text variable.

count: NUM

This specifies the amounts of characters the function returns from the Text variable.
Result A text value.

Example

The following computation looks at the client’s first, middle, and last names and returns only the first character from each of these variables. When merged together, these characters create the client’s initials:

FIRST( Client First Name, 1 ) + FIRST ( Client Middle Name, 1 ) + FIRST ( Client Last Name, 1 )

In the following example, the first four characters of a client’s last name are merged with a case number to create a file number.

FIRST ( Client Last Name, 4 ) + Case Number