HomeUsing LincDoc 3.0DANG Rule WizardFunctions

7.10. Functions

The following string functions are available:

Function

Inputs

Output

CityStateZip

City, State, and Zip

Formatted string -- city, state zip.

Concat

Two or more strings

Single string composed of the multiple inputs

ConcatWithSeparator

Two or more strings plus a separator string

Single string composed of the multiple string inputs separated by the specified separator

Csv

Two or more strings

Single string composed of the multiple string inputs surrounded by double quotes and separated by commas.  i.e., "Sam Smith","123 Main Street","Anytown","NY","12345","02/02/1968",

DecimalToString

Single decimal

Converts the decimal for use as a string

DoubleQuote

Single string

Input string surrounded by double quotes

Drat

DRAT expression (for internal use only)

DRAT expression output

DurationBetween

Two times

Duration between the two time values in HH:MM format.

EMPTY_STRING

None

Returns a zero length string value.

FirstWord

Single string

Excerpt of input string taken from the beginning to its first space character.  If the input string does not contain any spaces, it returns the full input string.

FullName

Two strings, first name and last name

Concatenation of the first name input, a space character, and the last name input.

IntToString

Single integer

Converts the integer for use as a string

LastWord

Single string

Excerpt of input string taken from its last space character.  If the input string does not contain any spaces, it returns the full input string.

Left

Single string, integer length of excerpt

Excerpt of input string taken from its start.

LowerCase

Single string

Input string with each uppercase character converted to lowercase.

NamedBytesName

Single upload file field

Filename of the uploaded file.

ParseDelimited

Single string (phrase), separating character (delimiter) defined with regular expression, integer index position 

(Index position is zero based.  Inputs of Here,is,another,string,phrase with a comma delimiter and an index of 2 returns a value of another.)

ParseWord

Single string (phrase), integer index position of word

Word from the input phrase at the indicated position. (Index position is zero based.  Inputs of Here is an example phrase and an index position of 3 returns a value of example.)

RandomString

integer length

String composed of the input length number of random characters

Replace

Input string, undesired character string, desired character string

Input string updated with new characters where the old characters previously existed.  

Right

Single string, integer length of excerpt

Excerpt of input string taken from its end.

SingleQuote

Single string

Input string surrounded by single quotes

Spaces

integer number of spaces

String value comprised of the input number of space characters

Substring

Single string, integer start position, integer length of excerpt

Excerpt of input string. (Index start position is zero based. An input string of 1234567890abcdefg, start position of 6, length of 8 gives an output of 7890abcd.)

TitleCase

Single string

Input string with the first character converted to upper case as well as all characters immediately preceded by a space.

ToString

Single string, integer, decimal, boolean, or date

Input value converted for use as a string

Trim

Single string

Input string with preceding or trailing space characters removed.

UpperCase

Single string

Input string with each lowercase letter converted to uppercase.

UserAttribute

attribute (username, full name, email address)

Value of the selected attribute

Boolean functions are described in the condition operator's table

The following numeric functions (integer, decimal) are available.   Decimal fields retain precision.  Integer fields results are rounded to the nearest integer. 2.5 is rounded to 2.

Function

Inputs

Output

Add

Two or more numeric values

Sum of the inputs.

Average

Two or more numeric values

Average of the inputs.

Ceil

Single numeric

Number always rounded up, i.e., input: 2.3, output 3  input 2.0, output 2   input 2.1, output 3

DayOf

Single date

Day of the month

DayOfWeekOf

Single date

Day of the week, where 1 is Sunday, 2 is Monday, 3 is Tuesday and so on.

DaysBetween

Two date fields

Number of days between the dates not including the start date or end date.

DaysInMonth

Single date

Number of calendar days in the month

DaysSince

Single date

 Number of days since the input date.

Divide

Two numeric values

The division result of the inputs.

Floor

Single numeric

Number always rounded down, i.e. input: 2.3, output 2.  input 2.0, output 2.  input 2.99,  output 2

HourOf

Single time

Hour in military time, midnight is 0, noon is 12.

HoursBetween

Two time values

Difference of hours between the times.

Int

Single numeric

Number always rounded down, similar to the floor output

Length

Single string

Length of the string

Max

Two numeric values

The greater of the inputs

Min

Two numeric values

The lesser of the inputs

MinuteOf

Single time value

The minute of the hour

MinutesBetween

Two time values

 The number of minutes between the times.

MonthOf

Single date

The numeric value of the month, i.e., February is 2

Multiply

Two or more numeric values

The multiplication result of the inputs

NamedBytesSize

 Single upload file field

 The size of the upload file in bytes

Pos

String phrase, matching string

The index of the matching string starting from the end of the string, i.e, string is abc de abe deabc, matching string is de output is 4. Where the matching string is not found, the output is -1.

QuarterOf

Single date

The quarter of the year, i.e., 2/29 is in quarter 1

Round

 Single numeric to round, integer of decimal places

 Rounds to specified number of decimal places.

RowCount

 Single multi value field

The number of instances of the multi value field.  For example, on an expense report with repeating expense fields, the number of expenses that have been entered.

RPos

String phrase, matching string

The index of the matching string starting from the end of the string, i.e, string is abc de abe deabc, matching string is de output is 11.  Where the matching string is not found, the output is -1.

StringToDecimal

Single numeric

The decimal value of the input

StringToInt

Single numeric

The integer value of the input

Subtract

Two numeric values

The result of the subtraction

Sum

Two or more numeric values

Sum of the inputs

YearOf

Single date

The year of the input field

YearsBetween

Two date values

The difference between the years

YearsSince

Single date

The number of years since the input date

 

This page was: Helpful | Not Helpful