---
title: Functions
slug: ryze/functions
description: Learn how to manipulate data and map dates with functions in this comprehensive document. Understand the structure and parameters of functions and explore a list of available functions with descriptions and expected parameters. Discover how to convert dat
createdAt: 2023-09-29T11:00:46.947Z
---

Functions can be used to perform operations on data, for example, to change strings or to compute other data. For mapping date/datetime variables you often need to convert into ISO 8601 format. The function “Convert date to ISO 8601” is used for this purpose. This section details the list of functions available with the Dataset Mapper plugin. For each listed function there is a description and the expected parameters for each function.

:::hint{type="info"}
Boolean and true/false functions may be case sensitive.
:::

## Function Structure

Whenever users are able to specify a function mapping in any context the structure of the function will always be the same. The structure is as follows:

- **Function Name** - This is a dropdown list of all the possible functions in the system. Refer to the **Function List&#x20;**&#x73;ection for detail on each individual function.
- **Parameter&#x20;**- The Parameter element provides the arguments for each function. The function selected will determine which parameter elements should exist. By default there will only be one Parameter element. Users need to manually add more parameters if required. Below is an example of how this works. 

Refer to the **Function List&#x20;**&#x73;ection for the expected mapping structure for the parameters and the possible number of parameters for each function. Some Functions may also support regex operations.

As the sources are datasets, there are no null values - only blank values. If a blank value is passed as a parameter, it is treated as a blank value. For example, running the Concatenate Function on a Source variable A="First", B=null, C="Last" will result in a return of “FirstLast”. Issues for blank returns in function calls are reported in the conversion log. 

Parameters follow the following typical structure:

*Source Type*

In this context, the Source Type is restricted to:

- None
- Source
- String
- Function
- Copy Mapping
- Choice
- ValueList: Name
- ValueList: Label
- ValueList: Data Value
- ValueList: Origin
- ValueList: Original Unit
- ValueList: Variable
- Sequence No: Number of Rows
- Sequence No: Number of Rows Per Subject
- Sequence No: Unscheduled Visit
- Populate IDVARVAL
- Comment Data Value



*Source*

See **Variable Properties > Mapping** for more details.

*Controlled Terminology Lookup*

See **Variable Properties > Mapping** for more details.

*Function*

See **Variable Properties > Mapping** for more details.

*Copy Mapping*

See **Variable Properties > Mapping** for more details.

*Choice*

See **Variable Properties > Mapping** for more details.

The parameter element is able to contain nested elements. This means that for a function, the first parameter can be a function on another set of parameters. 

## Function List

Below are all the functions in the system and the expected parameters for each one. 

### Convert date to ISO 8601

**Purpose:&#x20;**&#x43;onverts a date string or a numeric SAS date into an ISO 8601 date string, e.g. 1977-01-31

For SAS dates leave the date format blank. Unknown date components should appear in the date as "UN", "UNK", two hyphens or spaces ("--", " "), three hyphens or spaces ("---", " ")

**Expected Number of Parameters: 2**

**Parameter detail:&#x20;**&#x54;he first parameter should be a mapping structure which returns the date string the user wishes to convert to an ISO 8601 format.

The second parameter should be a mapping structure that returns a specified format for the date string.

**Example**

In the example below a Source column VSDTC is selected to be converted into ISO format. A second parameter specifies the correct format. 

&#x9;**Parameter 1:** 31 Jan 1977

&#x9;**Parameter 2:** dd MMM yyyy

&#x9;**Return:** 1977-01-31

### Convert time to ISO 8601

**Purpose:&#x20;**&#x43;onverts a time string or a numeric SAS time into an ISO 8601 time string, e.g. 13:22 For SAS times leave the time format blank

**Expected Number of Parameters: 2**

**Parameter detail:&#x20;**&#x54;he first parameter should be a mapping structure which returns the time string the user wishes to convert to an ISO 8601 format.

The second parameter should be a mapping structure that returns a specified format for the time string.

**Example**

In the example below a Source column VSTIM is selected to be converted into ISO format. A second parameter specifies the correct format. 

&#x9;**Parameter 1:** 53100

&#x9;**Parameter 2:** HH\:mm

&#x9;**Return:** 14:45

### Convert datetime to ISO 8601

**Purpose:&#x20;**&#x43;onverts a datetime string or a numeric SAS datetime into an ISO 8601 datetime string, e.g. 1977-01- 31T13:22

For SAS datetimes leave the datetime format blank

**Expected Number of Parameters: 2**

**Parameter detail:&#x20;**&#x54;he first parameter should be a mapping structure which returns the datetime string the user wishes to convert to an ISO 8601 format.

The second parameter should be a mapping structure that returns a specified format for the datetime string.

**Example**


In the example below a Source column VSDTC is selected to be converted into ISO format. A second parameter specifies the correct format. 

&#x9;**Parameter 1:** 31 Jan 1977 12:00

&#x9;**Parameter 2:** dd MMM yyyy HH\:mm

&#x9;**Return:** 1977-01-31T12:00

### Convert DMY to ISO 8601 date

**Purpose:&#x20;**&#x43;onverts a Date string into an ISO 8601 Date string.

**Expected Number of Parameters: 2 or 3**

**Parameter detail:&#x20;**&#x50;arameter 1 users should return a mapping structure which is a string that will represent the Day component.

Parameter 2 users should return a mapping structure which is a string that will represent the Month component. Parameter 3 users should return a mapping structure which is a string that will represent the Year component.

**Example**

 In the example below the first parameter returns the value of source column VSDAT\_DD. The second parameter returns the value of source column VSDAT\_MM. The third parameter returns the value of source column VSDAT\_YY. 

&#x9;**Parameter 1:** 21

&#x9;**Parameter 2:** JUN

&#x9;**Parameter 3:** 2005

&#x9;**Return:** 2005-06-21

### Convert HMS to ISO 8601 time

**Purpose:&#x20;**&#x43;onverts a time string into an ISO 8601 time string.

**Expected Number of Parameters: 3**

**Parameter detail:&#x20;**&#x50;arameter 1 users should return a mapping structure which is a string that will represent the Hour component.

Parameter 2 users should return a mapping structure which is a string that will represent the Minute component. Parameter 3 users should return a mapping structure which is a string that will represent the Second component.

**Example**

In the example below the first parameter uses a nested function to select the substring before the “:” in the VSTIM variable. The second parameter uses a nested function to select the substring after the “:” in the VSTIM variable. The function will ignore the missing third parameter. 

&#x9;**Parameter 1:** 12

&#x9;**Parameter 2:** 13

&#x9;**Return:** 12:13

### Convert DMYHMS to ISO 8601 datetime

**Purpose:&#x20;**&#x43;onverts a datetime string into an ISO 8601 datetime string.

**Expected Number of Parameters: 6**

**Parameter detail:&#x20;**&#x50;arameter 1 users should return a mapping structure which is a string that will represent the Day component.

Parameter 2 users should return a mapping structure which is a string that will represent the Month component. Parameter 3 users should return a mapping structure which is a string that will represent the Year component.

Parameter 4 users should return a mapping structure which is a string that will represent the Hour component. Parameter 5 users should return a mapping structure which is a string that will represent the Minute component. Parameter 6 users should return a mapping structure which is a string that will represent the Second component.

**Example**

In the example below the first parameter returns the value of source column VSDAT\_DD. The second parameter returns the value of source column VSDAT\_MM. The third parameter returns the value of source column VSDAT\_YY. The fourth parameter uses a nested function to select the substring before the “:” in the VSTIM variable. The fifth parameter uses a nested function to select the substring after the “:” in the VSTIM variable. The function will ignore the missing sixth parameter. 

&#x9;**Parameter 1:** 21

&#x9;**Parameter 2:** JUN

&#x9;**Parameter 3:** 2005

&#x9;**Parameter 4:** 12

&#x9;**Parameter 5:** 09

&#x9;**Return:** 2005-06-21T12:09

### Convert ISO 8601 date to SAS

**Purpose:&#x20;**&#x43;onverts an ISO 8601 date string into SAS date format

**Expected Number of Parameters: 1**

**Parameter detail:&#x20;**&#x54;he parameter mapping structure should return the ISO 8601 date string the user wishes to convert to SAS date format.

**Example**

In the example below parameter 1 returns the values of the Source Variable VSDAT which is an ISO 8601 format. 

&#x9;**Parameter 1:** 2000-03-17

&#x9;**Return:** 14686

### Convert ISO 8601 time to SAS

**Purpose:&#x20;**&#x43;onverts an ISO 8601 time string into SAS time format

**Expected Number of Parameters: 1**

**Parameter detail:&#x20;**&#x54;he parameter mapping structure should return the ISO 8601 time string the user wishes to convert to SAS time format.

**Example&#xA0;**

In the example below parameter 1 returns the values of the Source Variable VSTIM which is an ISO 8601 format. 

&#x9;**Parameter 1:** 14:45

**Return:** 53100

### Convert ISO 8601 datetime to SAS

**Purpose:&#x20;**&#x43;onverts an ISO 8601 datetime string into SAS datetime format

**Expected Number of Parameters: 1**

**Parameter detail:&#x20;**&#x54;he parameter mapping structure should return the ISO 8601datetime string the user wishes to convert to SAS datetime format.

**Example**

 In the example below parameter 1 returns the values of the Source Variable VSDTC which is an ISO 8601 format. 

&#x9;**Parameter 1:** 1977-01-31T10:41

**Return:** 539174460

### Compute duration

**Purpose:&#x20;**&#x43;omputes a duration string from two ISO 8601 dates / times / datetimes, defaulting to ISO 8601 standard format

**Expected Number of Parameters: 2 or 3**

**Parameter detail:&#x20;**&#x54;he first parameter mapping structure should return an ISO 8601 date/time/datetime string that will be treated as start date/time/datetime.

The second parameter mapping structure should return an ISO 8601 date/ time / datetime string that will be treated as the end date/time/datetime.

**Note:** Both Source Variables must be in the same format, for example, date (2021-10-17) or datetime (2021-10-17T07:44). If they are not in the same format then you must use another function to change the formatting.&#x20;

The third parameter is an optional parameter which will be a string to denote the format for the duration to be displayed.

**Example&#xA0;**

In the example below parameter 1 uses a nested function to convert AESTDTC into an ISO 8601 format. The same is done in parameter 2 for AEENDTC.  

&#x9;**Parameter 1:** 1977-01-01

&#x9;**Parameter 2:** 1978-02-02

&#x9;**Return:** P1Y1M1D

### Compute age

**Purpose:&#x20;**&#x43;omputes age based on two ISO 8601 dates. Defaults to Years.

**Expected Number of Parameters: 2 or 3**

**Parameter detail:&#x20;**&#x54;he first parameter mapping structure should return an ISO 8601 date/time/datetime string that will be treated as birth date/time/datetime.

The second parameter mapping structure should return an ISO 8601 date/ time / datetime string that will be treated as the current date/time/datetime.

**Note:** Both Source Variables must be in the same format, for example, date (2021-10-17) or datetime (2021-10-17T07:44). If they are not in the same format then you must use another function to change the formatting.&#x20;

The third parameter is an optional parameter which will be a string the units for the output (years, months, weeks, days, hours, minutes, seconds - default to "years"). This value for this parameter is case insensitive.

**Example**

In the example below parameter 1 is the Source variable containing the subject’s date of birth. The second parameter is the date of collection. The return is the subject’s age in years by default as no third parameter is set.  If a third parameter was set with the value of months the return would be “465”.

&#x9;**Parameter 1:** 1977-01-31

&#x9;**Parameter 2:** 2015-10-31

&#x9;**Return:** 38

### Compute DY

**Purpose:&#x20;**&#x47;ets the study day of the second date compared to the first date

**Expected Number of Parameters: 2**

**Parameter detail:&#x20;**&#x54;he first parameter mapping structure should return an ISO 8601 date. This will be the start date. Note for this the first date is considered day 1. The day before the first date is considered day -1.

The second parameter mapping structure should return an ISO 8601 date. This will be the end date.

**Note:** Both Source Variables must be in the same format, for example, date (2021-10-17) or datetime (2021-10-17T07:44). If they are not in the same format then you must use another function to change the formatting.&#x20;

Note as the functions requires to know the date in terms of which day of the year it is, if partial dates are given the full date will be imputed. 

For partial dates including months, for example “2018-02”, the date imputed by the converter will be “2018-02-01” so it can correctly convert to which day of the year it is (32 in this case). 

For partial dates including only the year, for example “2018”, the date imputed by the converter will be “2018-01-01” so it can correctly convert to which day of the year it is (1 in this case). 

**Example**

 In the example below parameter 1 is the reference start date for the Subject. Parameter 2 is the date time of collection. As it is prior to the reference start date the return is negative. 

&#x9;**Parameter 1:** 2012-05-29

&#x9;**Parameter 2:** 2012-05-15T10:41

**Return:** -14

### Length

**Purpose:&#x20;**&#x52;eturns the character count for a string.

**Expected Number of Parameters: 1**

**Parameter detail:&#x20;**&#x54;he parameter mapping structure should return the string the user wishes to calculate the string length of.

**Example&#xA0;**

In the example below the length of EXDOSE column is tested. 

&#x9;**Parameter 1:** 14.5

**Return:** 4

### Uppercase

**Purpose:&#x20;**&#x43;onverts a string to uppercase

**Expected Number of Parameters: 1**

**Parameter detail:&#x20;**&#x54;he parameter mapping structure should return the string the user wishes to uppercase.

**Example**

 In the example below the AETERM column is uppercased.  

&#x9;**Parameter 1:** Headache

**Return:** HEADACHE

### Lowercase

**Purpose:&#x20;**&#x43;onverts a string to lowercase

**Expected Number of Parameters: 1**

**Parameter detail:&#x20;**&#x54;he parameter mapping structure should return the string the user wishes to lowercase.

**Example**

In the example below the DSTERM column is lowercased. 

&#x9;**Parameter 1:** INFORMED CONSENT

**Return:** informed consent

### Trim

**Purpose:&#x20;**&#x52;emoves leading and trailing spaces

**Expected Number of Parameters: 1**

**Parameter detail:&#x20;**&#x54;he parameter mapping structure should return the string the user wishes to trim.

**Example**

In the example below the COVAL column is trimmed. 

&#x9;**Parameter 1:**         Test String     

**Return:** Test String

### Concatenate

**Purpose:&#x20;**&#x4A;oins multiple strings

**Expected Number of Parameters:&#x20;**&#x55;nlimited

**Parameter detail:&#x20;**&#x45;ach Parameter mapping structure should return the string that the user wishes to be included in the concatenation.

**Example**

In the example below parameter 1 will return the value of the PROJECT column value. Parameter 2 will return a “-“character. Parameter 3 will return the SUBJECT column value. 

&#x9;**Parameter 1:&#x20;**&#x41;BC

&#x9;**Parameter 2:&#x20;**-

&#x9;**Parameter 3:&#x20;**&#x31;001

**Return:** ABC-1001

### Contains

:::hint{type="info"}
"true" or "false" parameters are case sensitive.
:::

**Purpose:&#x20;**&#x52;eturns 'true' if the test string is contained within the string

**Expected Number of Parameters: 2**

**Parameter detail:&#x20;**&#x54;he first parameter should be a mapping structure that will return the string to that will be the source for the string check.

The second parameter should be a mapping structure that will return the string the user wishes to see contained inside parameter 1. This is case sensitive. This parameter does not support regex. 

**Example**

In the example below parameter 1 will return the value of the PROJECT column value. Parameter 2 specifies the string of “GSK” to be searched for in parameter 1. 

&#x9;**Parameter 1:&#x20;**&#x47;SK1001

&#x9;**Parameter 2:&#x20;**&#x47;SK

**Return:** true

### Starts With

:::hint{type="info"}
"true" or "false" parameters are case sensitive.
:::

**Purpose:&#x20;**&#x52;eturns 'true' if the string starts with the test string

**Expected Number of Parameters: 2**

**Parameter detail:&#x20;**&#x54;he first parameter should be a mapping structure that will return the string which will be the source for the string check.

The second parameter should be a mapping structure that will return the string the user wishes to see at the start of parameter 1. This is case sensitive. This parameter does not support regex.

**Example**

In the example below parameter 1 will return the value of the SUBJECT column value. Parameter 2 specifies the string of “200” to be searched as the start of parameter 1. 

&#x9;**Parameter 1:&#x20;**&#x32;0010

&#x9;**Parameter 2:&#x20;**&#x32;00

**Return:** true

### Ends With

:::hint{type="info"}
"true" or "false" parameters are case sensitive.
:::

**Purpose:&#x20;**&#x52;eturns 'true' if the string ends with the test string

**Expected Number of Parameters: 2**

**Parameter detail:&#x20;**&#x54;he first parameter should be a mapping structure that will return the string which will be the source for the string check.

The second parameter should be a mapping structure that will return the string the user wishes to see at the end of parameter 1. This is case sensitive. This parameter does not support regex.

**Example**

In the example below parameter 1 will return the value of the SUBJECT column value. Parameter 2 specifies the string of “001” to be searched at the end of parameter 1. 

&#x9;**Parameter 1:&#x20;**&#x32;0010

&#x9;**Parameter 2:&#x20;**&#x30;01

**Return:** false

### Substring before

**Purpose:&#x20;**&#x52;eturns the string before the test string

**Expected Number of Parameters: 2**

**Parameter detail:&#x20;**&#x54;he first parameter should be a mapping structure that will return the string which will be the source for the string check.

The second parameter should be a mapping structure that will return the marker in parameter 1 and everything before that marker will be returned. This is case sensitive. When there are multiple markers it will return everything before the first instance of the marker. This parameter does not support regex.

**Example**

In the example below parameter 1 will return the value of the SUBJECT column value. Parameter 2 specifies the string of “-” to be used as a marker for which to search everything before the marker. 

&#x9;**Parameter 1:&#x20;**&#x31;001-32

&#x9;**Parameter 2:&#x20;**-

**Return:** 1001


### Substring after

**Purpose:&#x20;**&#x52;eturns the string after the test string

**Expected Number of Parameters: 2**

**Parameter detail:&#x20;**&#x54;he first parameter should be a mapping structure that will return the string which will be the source for the string check.

The second parameter should be a mapping structure that will return the marker in parameter 1 and everything after that marker will be returned. This is case sensitive. When there are multiple markers it will return everything after the first instance of the marker. This parameter does not support regex.

**Example**

In the example below parameter 1 will return the value of the SUBJECT column value. Parameter 2 specifies the string of “-” to be used as a marker for which to search everything after the marker. 

&#x9;**Parameter 1:&#x20;**&#x31;001-32

&#x9;**Parameter 2:&#x20;**-

**Return:** 32

### Substring

**Purpose:&#x20;**&#x52;eturns a string of the specified length starting at the specified position.

**Expected Number of Parameters: 3**

**Parameter detail:&#x20;**&#x54;he first parameter should be a mapping structure that will return the string which will be the source for the string check.

The second parameter should be an integer to denote the starting position in the string from parameter one. The third parameter should be an integer to denote the length for which the substring should occur.

**Example**

In the example below parameter 1 will return the value of the SUBJECT column value. Parameter 2 specifies the string of “3” which is used as the marker point in the string. Parameter 3 specifies number of characters after the marker to return. 

&#x9;**Parameter 1:&#x20;**&#x31;001-32

&#x9;**Parameter 2:&#x20;**&#x33;

&#x9;**Parameter 3:&#x20;**&#x32;

&#x9;**Return:** 01

### Split

**Purpose:&#x20;**&#x53;plits string

**Expected Number of Parameters: 3**

**Parameter detail:&#x20;**&#x54;he first parameter should be a mapping structure that will return the string which will be the source for the string check.

The second parameter should be a mapping structure which returns a regular expression.

The third parameter should be an integer to denote at what position the first parameter should be split based on the second parameter.

**Example**

In the example below parameter 1 will return the value of the VSPOS column value. Parameter 2 specifies the string of “,” which is used as the delimiter to split the string. Parameter 3 specifies the index of the split to be returned.  No trimming is done as part of the function so leading or trailing spaces would be retained.

&#x9;**Parameter 1:&#x20;**&#x55;pper, Right, Arm

&#x9;**Parameter 2:&#x20;**,

&#x9;**Parameter 3:&#x20;**&#x32;

**Return:** Right

### Replace

**Purpose:&#x20;**&#x46;ind and replace in string

**Expected Number of Parameters: 3**

**Parameter detail:&#x20;**&#x54;he first parameter must be a mapping structure that will return the string which will be the source for the replacement operation.

The second parameter must match part of the source in Parameter 1.

The third parameter replaces the string in parameter 1 based on parameter 2.

Trailing spaces are retained.

**Example**

In the example below, if parameter 1 is the source variable's value "NAUSEA?". Parameter 2 specifies the string of “!” as the character to be replaced. Parameter 3 specifies the string “” to replace parameter 2 with.  No trimming is done as part of the function so leading or trailing spaces would be retained.

&#x9;**Parameter 1:&#x20;**&#x4E;AUSEA?

&#x9;**Parameter 2:&#x20;**?

&#x9;**Parameter 3:&#xA0;**!

**Return:** NAUSEA!



**Example 2**

![](https://api.archbee.com/api/optimize/aRGXD44FysHcCUICvfsxc/Yujms-WK7hLL5CyOP3Z9T_image.png)

| PATIENTID Before                       | PATIENTID After                |
| -------------------------------------- | ------------------------------ |
| 38516<br />38517<br />38518<br />38519 | 516<br />517<br />518<br />519 |
|                                        |                                |



**Example 3**

In this example, a Regular Expression (REGEX) is used to match line breaks or carriage returns in the source data. These are replaced with an empty string.

- Parameter 1: Specifies the source variable which contains the data with carriage returns.
- Parameter 2: `\r*\n*` matches:&#x20;
  - Zero or more carriage return characters (\r)
  - Zero or more newline characters (\n)
  - \* is a quantifier that matches 0 or more occurrences of the preceding element&#x20;
- Parameter 3: is an empty string, which means the line breaks are removed.

![](https://api.archbee.com/api/optimize/aRGXD44FysHcCUICvfsxc/s0jG-m8AWOkQi-wlIDlOa_image.png)

### Translate

**Purpose:&#x20;**&#x54;ranslates specific characters

**Expected Number of Parameters: 3**

**Parameter detail:&#x20;**&#x54;he first parameter should be a mapping structure that will return the string which will be the source for the string check.

The second parameter should be a mapping that returns a string to translate from.&#x20;

The third parameter should be a mapping structure that will return the string match you wish translate to.

**Example**

In the example below parameter 1 will return the value of the CETERM column value. Parameter 2 specifies the string of “--” which is used as the character to be replaced. Parameter 3 specifies the string “” to replace parameter 2 with. 

&#x9;**Parameter 1:&#x20;**&#x4E;AUSEA1231

&#x9;**Parameter 2:&#x20;**&#x31;2

&#x9;**Parameter 3:&#x20;**

**Return:** NAUSEA3



**Example2**

![](https://api.archbee.com/api/optimize/aRGXD44FysHcCUICvfsxc/GF3ahDK1Nt3Gq2JamtAVd_image.png)

| PATIENTID Before                       | PATIENTID After           |
| -------------------------------------- | ------------------------- |
| 38516<br />38517<br />38518<br />38519 | 16<br />17<br />1<br />19 |

### Clean

**Purpose:&#x20;**&#x52;emoves all non-alphanumeric characters

**Expected Number of Parameters: 1**

**Parameter detail:&#x20;**&#x54;he first parameter should be a mapping structure that will return the string which should have all non-alphanumeric characters removed. This is strictly the upper and lowercase A-Z letters and 0-9.

**Example**

In the example below parameter 1 is the value of a mapped variable.. 

&#x9;**Parameter 1: \***&#x50;NEUMONIA\*

**Return:** PNEUMONIA

### Format

**Purpose:&#x20;**&#x47;enerates a string in a specified format.

**Expected Number of Parameters:&#x20;**&#x55;nlimited

**Parameter detail:&#x20;**&#x54;he first parameter should be a mapping structure to return the format the user wishes to be implemented on the list of strings provided in the following parameter. The format can be any regular expression.

Once the format is specified in parameter 1 users can implement unlimited parameters after this for which the format in parameter will be applied too.

**Example**

In the example below parameter 1 specifies a regular expression to uppercase characters. Parameter 2 reads the value of the source column of COVAL. 

**Parameter 1:&#x20;**%B

&#x9;**Parameter 2:** This is a comment

**Return:** THIS IS A COMMENT

### Wordwrap

**Purpose:&#x20;**&#x53;plits text strings at word boundaries.

**Expected Number of Parameters: 3**

**Parameter detail:&#x20;**&#x54;he first parameter should be a mapping structure that will return the string which will be the source for the string check.

The second parameter should be an integer to denote length of text to be taken from parameter one.

The third parameter should be an integer to denote the index for where the split should happen in the string provided in parameter 1, based on the size from parameter 2.

**Example**

The example below details the mapping for the COVAL2 variable. Parameter 1 will return the value of the COVAL column value. Parameter 2 specifies to split parameter 1 into chunks of 200. Parameter then selects the second chunk. Chunks will not split on full words. 

**Parameter 1:&#x20;**&#x43;OVAL \[value of length 500]

&#x9;**Parameter 2:&#x20;**&#x32;00

&#x9;**Parameter 3:&#x20;**&#x32;

**Return:** Characters in the 200-400 range with respect to word boundaries. 

### Maximum

**Purpose:&#x20;**&#x52;eturns Maximum for a set of numbers

**Expected Number of Parameters:&#x20;**&#x55;nlimited

**Parameter detail:&#x20;**&#x45;ach parameter should be a mapping structure that returns an integer.

**Example**

In the example below parameter 1 will return the value of the DOSE1 column value. Parameter 2 will return DOSE2 and parameter 3 will return DOSE3.  Note that null results will be ignored.

&#x9;**Parameter 1:&#x20;**&#x31;0

&#x9;**Parameter 2:&#x20;**&#x32;3

&#x9;**Parameter 3:&#x20;**&#x31;5

**Return:** 23

### Minimum

**Purpose:&#x20;**&#x52;eturns Minimum for a set of numbers

**Expected Number of Parameters:&#x20;**&#x55;nlimited

**Parameter detail:&#x20;**&#x45;ach parameter should be a mapping structure that returns an integer.

**Example**

In the example below parameter 1 will return the value of the DOSE1 column value. Parameter 2 will return DOSE2 and parameter 3 will return DOSE3.  Note that null results will be ignored.

&#x9;**Parameter 1:&#x20;**&#x31;0

&#x9;**Parameter 2:&#xA0;**

&#x9;**Parameter 3:&#x20;**&#x31;5

**Return:** 10

### Add

**Purpose:&#x20;**&#x4E;umeric Addition (A+B)

**Expected Number of Parameters: 2**

**Parameter detail:&#x20;**&#x54;he first parameter should be a number that will be used as part of the addition. The second parameter should be an integer that will be used as part of the addition.

**Example**

In the example below parameter 1 will return the value of the DOSE1 column value. Parameter 2 will return DOSE2. 

&#x9;**Parameter 1:&#x20;**&#x31;0

&#x9;**Parameter 2:&#x20;**&#x32;0

**Return:** 30

### Subtract

**Purpose:&#x20;**&#x4E;umeric Subtraction (A-B)

**Expected Number of Parameters: 2**

**Parameter detail: &#x20;**&#x4E;umeric inputs and outputs (integer or float) must be used.

The first parameter is a number that is used as part of the subtraction.&#x20;

The second parameter is a number that is used as part of the subtraction.

**Example&#xA0;**

&#x9;**Parameter 1:&#x20;**&#x31;0

&#x9;**Parameter 2:&#x20;**&#x32;0

**Return:** -10

### Multiply

**Purpose:&#x20;**&#x4D;ultiply (AxB)

**Expected Number of Parameters: 2**

**Parameter detail:&#x20;**&#x54;he first parameter should be a number that will be used as part of the Multiplication. The second parameter should be an integer that will be used as part of the Multiplication.

**Example&#xA0;**

In the example below parameter 1 will return the value of the DOSE1 column value. Parameter 2 will return DOSE2. 

&#x9;**Parameter 1:&#x20;**&#x31;0

&#x9;**Parameter 2:&#x20;**&#x32;0

**Return:** 200

### Divide

**Purpose:&#x20;**&#x44;ivide (A÷B)

**Expected Number of Parameters: 2**

**Parameter detail:&#x20;**&#x54;he first parameter should be a number which will be the dividend. The second parameter should be an integer which will be the divisor.

**Example**

In the example below parameter 1 will return the value of the DOSE1 column value. Parameter 2 will return DOSE2. 

&#x9;**Parameter 1:&#x20;**&#x31;0

&#x9;**Parameter 2:&#x20;**&#x32;0

**Return:** 0.5

### And

:::hint{type="info"}
"true" or "false" parameters are case sensitive.
:::

**Purpose:&#x20;**&#x42;oolean (A and B). Function will return true if both A and B are equal.

**Expected Number of Parameters: 2**

**Parameter detail:&#x20;**&#x54;he first parameter should be a mapping structure which returns a true or false to be used as the first part of the Boolean And check.

The second parameter should be a mapping structure which returns a true or false to be used as the second part of the Boolean And check.

**Example**

In the example below parameter 1 will return the value of the “true”. Parameter 2 will return the value of “true”. 

&#x9;**Parameter 1:&#x20;**&#x74;rue

&#x9;**Parameter 2:&#x20;**&#x74;rue

**Return:** true

### Or

**Purpose:&#x20;**&#x42;oolean (A or B). Function will return true if A or B exist, otherwise return false

**Expected Number of Parameters: 2**

**Parameter detail:&#x20;**&#x54;he first parameter should be a mapping structure which returns a true or false to be used as the first part of the Boolean Or check.

The second parameter should be a mapping structure which returns a true or false to be used as the second part of the Boolean Or check.

**Example**

In the example below parameter 1 will return the value of the “true”. Parameter 2 will return the value of “false”. 

&#x9;**Parameter 1:&#x20;**&#x74;rue

&#x9;**Parameter 2:&#x20;**&#x66;alse

**Return:** true

### Not

**Purpose:&#x20;**&#x42;oolean Not(A)

**Expected Number of Parameters: 1**

**Parameter detail:&#x20;**&#x54;he first parameter should be a mapping structure which returns true or false. The result of this function will be the opposite of this parameter.

**Example**

In the example below parameter 1 will return the value of the “true”. 

&#x9;**Parameter 1:&#x20;**&#x74;rue

**Return:** false

### Is Numeric

:::hint{type="info"}
"true" or "false" parameters are case sensitive.
:::

**Purpose:&#x20;**&#x52;eturns 'true' if the value is a number, otherwise return ‘false’.

**Expected Number of Parameters: 1**

**Parameter detail:&#x20;**&#x54;he first parameter should be a mapping structure that will return the value for the numeric check.

**Example**

In the example below parameter 1 will return the value of the “65.6”.

&#x9;**Parameter 1:&#x20;**&#x36;5.6

**Return:** true

### Is integer

:::hint{type="info"}
"true" or "false" parameters are case sensitive.
:::

**Purpose:&#x20;**&#x52;eturns 'true' if the value is an integer, otherwise return ‘false’.

**Expected Number of Parameters: 1**

**Parameter detail:&#x20;**&#x54;he first parameter should be a mapping structure that will return the value for the integer check.

**Example**

In the example below parameter 1 will return the value of the “65.6”.

&#x9;**Parameter 1:&#x20;**&#x36;5.6

**Return:** false

### Is float

:::hint{type="info"}
"true" or "false" parameters are case sensitive.
:::

**Purpose:&#x20;**&#x52;eturns 'true' if the value has a decimal component, otherwise return ‘false’.

**Expected Number of Parameters: 1**

**Parameter detail:&#x20;**&#x54;he first parameter should be a mapping structure that will return the value for the decimal check.

**Example**

In the example below parameter 1 will return the value of the “65.6”.

&#x9;**Parameter 1:&#x20;**&#x36;5.6

**Return:** true

### Round

**Purpose:&#x20;**&#x52;ounds using the specified number of decimal places. Defaults to "half up" rounding

**Expected Number of Parameters: 2 or 3**

**Parameter detail:&#x20;**&#x54;he first parameter should be a mapping structure that will return an number to be rounded. The second parameter should be an integer to denote the maximum number of decimal places.

The third parameter is optional to denote the type of rounding i.e. ceiling, floor, up, down, half up, half down, half even. This is case insensitive.

**Example**

In the example below parameter 1 will return the value of the “1.05”. Parameter 2 specifies the string of “3” and parameter specifies the optional parameter of “floor”

&#x9;**Parameter 1:&#x20;**&#x31;.0554

&#x9;**Parameter 2:&#x20;**&#x33;

&#x9;**Parameter 3:&#x20;**&#x66;loor


**Return:** 1.055

### Get Standard Unit

**Purpose:&#x20;**&#x54;his function returns the standard unit for a given original unit, with the specified context

**Expected Number of Parameters: up to 6**

**Parameter detail:&#x20;**&#x54;he first parameter should be a mapping structure that returns a string which is the original unit for conversion. This should match a coded value in a CodeList with map: Unit Conversion property set to Yes.

The next 5 parameter are optional parameters to satisfy the When condition of the Standard Unit mapping.

**Example**

In the example below parameter 1 uses the ValueList Original Unit functionality to return the Standard unit. The example below shows how users set the unit conversion for Weight collection values. The conversion will convert “lb” to “kg”. Users must specify that on “lb” what they want to convert too and specify the formula to drive this conversion. Users must also specify on “kg” that this will be the converted value.

**Parameter 1:&#x20;**&#x6C;b

**Return:** kg

### Convert to Standard Unit

**Purpose:&#x20;**&#x50;erforms conversions to standardized units. The standard units for each original unit are specified in a controlled terminology. Original units can map to different standard units depending on parameters like TESTCD, METHOD etc.

**Expected Number of Parameters: up to 6**

**Parameter detail:&#x20;**&#x54;he correct Standard Unit is found as per "Get standard unit". The value is then converted into that unit using the specified conversion factors.

Standard Value = Constant A / Constant B \* (Original Value + Constant C) + Constant K Constant A and Constant B default to "1"

Constant C and Constant K default to "0"

**Example**

In the example below parameter 1 uses the ValueList Data Value functionality to return the value which is to be converted to the standardized format. The second parameter uses the ValueList Original Unit functionality to return the Standard unit.

&#x9;**Parameter 1:&#x20;**&#x31;80

&#x9;**Parameter 2:&#x20;**&#x6C;b

**Return:** 81.6




