Home → Using LincDoc 3.1+ → DANG Rule Wizard → Functions
This section contains a list of all available functions, divided based on the type of function.
Proceed to one of the following topics for more information:
Boolean functions are described in the condition operator's table.
The available date functions are listed below.
Tip: It is recommended that you review About Function Formatting for important information on valid formats for certain date functions.
Function |
Inputs |
Output |
Available with |
Age |
Date (typically, a date of birth) |
The age, in years (always an integer) |
✓ |
DateAddDays |
Date, additional days value |
Add the given number of days to the given date, returning the new date |
✓ |
DateAddMonths |
Date, additional months value |
Add the given number of months to the date, and return that as a new date value |
✓ |
DateAddYears |
Date, additional years value |
Add the given number of years to the date, and return that as a new date value |
✓ |
DateCurrent |
Timezone |
Return the current date for the given timezone |
✓ |
DateFromDateTime |
Datetime, timezone |
Return the date from the given datetime in the given timezone |
✓ |
DateFromYearMonthDay |
Year, month, and date |
Return a new date from the given 4 digit year, month (1-12), and day of month (1-31) |
✓ |
DateGetDayOfMonth |
Single Date |
Returns the day of the month for the given date field |
✓ |
DateGetDayOfWeek |
Single Date |
Returns the day of the week for the given date field as an integer between 1 (Sunday) and 7 (Saturday) |
✓ |
DateGetDaysInMonth |
Single Date |
For the month of the given date field, how many days are there for that month |
✓ |
DateGetMonth |
Single Date |
For the given date field, return the month as an integer between 1 (January) and 12 (December) |
✓ |
DateGetQuarter |
Single Date |
For the given date field, return the quarter as an integer between 1 (1st quarter) and 4 (4th quarter) |
✓ |
DateGetYear |
Single Date |
For the given date field, return the 4 digit year as an integer |
✓ |
DateQuarterFirstDay |
Single date |
Return a new date which represents the first date of the quarter for the quarter in which the given date falls |
✓ |
DateQuarterLastDay |
Single date |
Return a new date which represents the last date of the quarter for the quarter in which the given date falls |
✓ |
DateSetDayOfMonth |
Date, day of month value |
Return a new date which takes the given date and sets the day of that month to the given value |
✓ |
DateSetMonth |
Date, set month value |
Return a new date which takes the given date and sets the month to the given value |
✓ |
DateSetYear |
Date, set year value |
Return a new date which takes the given year and sets the year to the given value |
✓ |
DateToString |
Date and format |
Convert a date object to a string in the given format |
|
MonthOf |
Single date |
The numeric value of the month, i.e., February is 2 |
The available time functions are listed below.
Tip: It is recommended that you review About Function Formatting for important information on valid formats for certain datetime functions.
Function |
Inputs |
Output |
Available with |
HoursBetweenTimes |
Two time values |
Difference of hours between the times |
✓ |
MinutesBetweenTimes |
Two time values |
The number of minutes between the times |
✓ |
TimeAddHours |
Time, additional hours value |
Add the given number of hours to the given time, and return a new time value |
✓ |
TimeAddMinutes |
Time, additional minutes value |
Add the given number of minutes to the given time, and return a new time value |
✓ |
TimeCurrent |
Timezone |
Return a new time object which is the current time for the given timezone |
✓ |
TimeFromDateTime |
Datetime, timezone |
Return a new time object which is the time portion of the given datetime object in the given timezone |
✓ |
TimeFromHourMinute |
Hour, minute |
Return a new time value for the given hour (0-23) and minute (0-59) |
✓ |
TimeGetHour |
A time value |
For the given time, return the hour as an integer between 0 (midnight) and 23 (11 PM) |
✓ |
TimeGetMinute |
A time value |
For the given time, return the minute value as an integer between 0 and 59 |
✓ |
TimeSetHour |
Time, set hour value |
For the given time value, set the hour to the given hour and return a new time value |
✓ |
TimeSetMinute |
Time, set minute value |
For the given time value, set the minutes to the given minutes and return a new time value |
✓ |
TimeToString |
Time and format |
Convert a time value to a string in the given format |
|
TimeZone |
Zone ID |
Returns a TimeZone Java object, which matches the selected time zone. Requires a single string argument describing the time zone (such as "EST). |
✓ |
TimeZoneClient |
None |
Returns a TimeZone Java object containing the current client ID's default time zone. Client IDs are set and maintained by the LincDoc server. |
✓ |
TimeZoneSystem |
None |
Returns a TimeZone Java object containing the current system's time zone. The "system" refers to the host operating system under which LincDoc is running. |
✓ |
TimeZoneUser |
None |
Returns a TimeZone Java object containing the current user's time zone, which can be set and altered by the user on his/her computer, if necessary. |
✓ |
Today |
Datetime |
Returns "true" if the specified datetime value is today's date. Otherwise, returns "false". |
The available datetime functions are listed below.
Tip: It is recommended that you review About Function Formatting for important information on valid formats for certain datetime functions.
Function |
Inputs |
Output |
Available with |
DateTimeAddDays |
Datetime, additional days value |
Add the given number of days to the given datetime, and return that value as a new datetime |
✓ |
DateTimeAddHours |
Datetime, additional hours value |
Add the given number of hours to the given datetime, and return that value as a new datetime |
✓ |
DateTimeAddMilliseconds |
Datetime, additional milliseconds value |
Add the given number of milliseconds to the given datetime, and return that value as a new datetime |
✓ |
DateTimeAddMinutes |
Datetime, additional minutes value |
Add the given number of minutes to the given datetime, and return that value as a new datetime |
✓ |
DateTimeAddMonths |
Datetime, additional months value |
Add the given number of months to the given datetime, and return that value as a new datetime |
✓ |
DateTimeAddSeconds |
Datetime, additional second value |
Add the given number of seconds to the given datetime, and return that value as a new datetime |
✓ |
DateTimeAddYears |
Datetime, additional years value |
Add the given number of years to the given datetime, and return that value as a new datetime |
✓ |
DateTimeCurrent |
None |
Returns a new datetime object which is the the current date and time |
✓ |
DateTimeFromDateandTime |
Date, time, and timezone |
Returns a new datetime object from the given date, time and timezone |
✓ |
DateTimeGetDayOfMonth |
Datetime, timezone |
Similar to "Date" counterpart function, but inputs are a datetime object and a timezone |
|
DateTimeGetHour |
Datetime, timezone |
For the given datetime and timezone, return the hour of the day as an integer between 0 (12:00 AM) and 23 (11:00 PM) |
✓ |
DateTimeGetMillisecond |
Datetime, timezone |
For the given datetime and timezone, return the milliseconds value For example, "Jan 1, 1970 2:01.293" would return 293 |
✓ |
DateTimeGetMinute |
Datetime, timezone |
For the given datetime and timezone, return the minutes value For example, "Jan 1, 1970 2:01.293" would return 1 |
✓ |
DateTimeGetMonth |
Datetime, timezone |
For the given datetime and timezone, return the month as an integer For example, "Feb 1, 1970 2:01.293" would return 2 |
✓ |
DateTimeGetSecond |
Datetime, timezone |
For the given datetime and timezone, return the seconds value For example, "Jan 1, 1970 2:11.293" would return 11 |
✓ |
DateTimeGetYear |
Datetime, timezone |
For the given datetime and timezone, return the year value For example, "Jan 1, 1970 2:11.293" would return 1970 |
✓ |
DateTimeSetDayOfMonth |
Datetime, timezone, set day or month value |
For the given datetime and timezone, change the month to the given month and return a new datetime |
✓ |
DateTimeSetHour |
Datetime, timezone, set hour value |
For the given datetime and timezone, change the hour to the given value and return a new datetime |
✓ |
DateTimeSetMillisecond |
Datetime, timezone, set millisecond value |
For the given datetime and timezone, change the milliseconds value to the given value and return a new datetime |
✓ |
DateTimeSetMinute |
Datetime, timezone, set minute value |
For the given datetime and timezone, change the minutes value to the given value and return a new datetime |
✓ |
DateTimeSetMonth |
Datetime, timezone, set month value |
For the given datetime and timezone, change the month value to the given value and return a new datetime |
✓ |
DateTimeSetSecond |
Datetime, timezone, set second value |
For the given datetime and timezone, change the seconds value to the given value and return a new datetime |
✓ |
DateTimeSetYear |
Datetime, timezone, set year value |
For the given datetime and timezone, change the year value to the given value and return a new datetime |
✓ |
DateTimeToString |
Datetime, timezone, and format |
Convert a datetime object to a string in the given format (see this page for details on the format string) |
✓ |
DaysBetweenDateTimes |
Two datetime fields |
Number of days between the datetimes not including the start date or end date |
✓ |
HoursBetweenDateTimes |
Two datetime values |
Difference of days and hours between the datetimes |
✓ |
MinutesBetweenDateTimes |
Two datetime values |
The number of minutes between the datetimes |
✓ |
YearsBetweenDateTimes |
Two datetime values |
The difference between the years |
✓ |
The following numeric functions (integer, decimal, currency) are available. Decimal fields retain precision. Integer fields results are rounded to the nearest integer. 2.5 is rounded to 2.
Function |
Inputs |
Output |
Available with |
Add |
Two or more numeric values |
Sum of the inputs |
✓ |
Average |
Two or more numeric values |
Average of the inputs |
|
AverageScaled |
Scale and an arbitrary set of numbers |
Averages all the given numbers, rounding to the number of decimal places indicated by the scale |
✓ |
Ceil |
Single numeric |
Number always rounded up, i.e., input: 2.3, output 3 input 2.0, output 2 input 2.1, output 3 |
✓ |
CheckedBoxes |
Check box group |
The number of checked boxes for the given check box group |
|
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 |
✓ |
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 |
✓ |
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. |
✓ |
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 value |
The decimal value of the input |
✓ |
StringToInt |
Single numeric value |
The integer value of the input |
✓ |
Subtract |
Two numeric values |
The result of the subtraction |
✓ |
Sum |
Two or more numeric values Note: This function is also available as a table function. |
Sum of the inputs |
✓ |
The following signature functions are available:
Function |
Inputs |
Output |
Available with |
SignDate |
Signature field |
Return the date that the given field was signed |
✓ |
SignatureID |
Signature field |
The database unique ID of the given signature |
|
SignerIpAddr |
Signature field |
IP address of user's browser at signature capture time for the given signature |
|
SignerName |
Signature field |
The signer's name corresponding to the given signature field |
|
SignerUID |
Signature field |
The LincDoc user UID value in effect when the signature was captured Note: UID stands for "user ID" and is a unique integer assigned to each LincDoc user |
|
SignerUsername |
Signature field |
The logged in username in effect when the given signature field was captured |
The following string functions are available:
Function |
Inputs |
Output |
Available with |
CityStateZip |
City, State, and Zip |
Formatted string -- city, state zip |
✓ |
ClientIP |
None |
IP address of current user's browser |
|
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 |
Decimal value and format string |
Converts the decimal for use as a string |
|
DocId |
None |
The document ID number that will be assigned to the generated document (note: if modifying an existing document, the original number is retained when changes are saved) |
|
DoubleQuote |
Single string |
Input string surrounded by double quotes |
✓ |
Drat |
DRAT expression (for internal use only) |
DRAT expression output |
|
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 |
✓ |
IfThenElse |
Three arguments: a conditions, an expression (which is the result of the function if the condition is "true"), a second expression (which is a result of the function if the condition is "false"). Note: This function is only available when used in conjunction with the ToString function. |
Result of the condition, which varies based on whether the condition is "true" or "false" |
✓ |
IntToString |
Single integer |
Converts the integer for use as a string |
✓ |
JdbcSelect |
Data source name, SQL query, default value (if no matching records are found) Note: This function is only available when used in conjunction with the ToString function. |
Value of the first row of the first column in the corresponding database |
|
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 |
|
NEWLINE |
None |
A single newline character |
|
ParseDelimited |
Single string (phrase), separating character (delimited), 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 |
✓ |
RandomUUID |
None |
A new UUID |
|
Replace |
Input string, search pattern, replacement character string (full reference is here) |
Input string updated with new characters where all occurrences of the search pattern 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 |
✓ |
UserFullName |
None |
The full name (usually Firstname Lastname) of the current logged in user |
✓ |
UserID |
None Note: This function only applies to specific situations and is rarely needed. For more information, contact Technical Support. |
Integer which is the internal user ID number used by the database |
|
UserMail |
None |
The email address of the current logged in user |
✓ |
Username |
None |
The username of the current logged in user |
✓ |
The following table (multi-row, multi-value) functions are available:
Function |
Inputs |
Output |
Available with |
Loop |
Group with a field, a where statement, a variable, a value |
A running (dynamic) total of the specified fields and calculations. |
|
RowMatchValue |
Name of a field that exists in some multi-row table, condition, value |
The value (third argument) for the first row in the table such that the condition is true. |
|
Sum |
Two time values Note: This function is also available as a numeric function. |
Sum of the inputs |
The following codelist functions are available:
Function |
Inputs |
Output |
Available with |
CodeListLabel |
Codelist field |
For the given codelist field specified for the input, this function will output the "label" value of the currently selected item of the codelist field; generally this value is most useful inside a generation calculation. |
✓ |
CodeListDescription |
Codelist field |
For the given codelist field specified for the input, this function will output the "description" value of the currently selected item of the codelist field; generally this value is most useful inside a generation calculation. |
✓ |