Skip to main content

Index of ATL functions

KEY FOR THE TABLE

Name = The name of the function.

Builder = Whether a function is supported in Arria NLG Studio’s Function Builder. If a function is marked ✓, it is available in the Function Builder in most project types (a few marked ✓ are not in the Function Builder for JSON projects). Functions that are not available in the Function Builder in any project type are marked x; these functions can, of course, be used by constructing function calls in ATL.

Description = A brief description of the function. For a more detailed description, including parameter descriptions and examples of usage, click on the function name.

Row, Table, Context, JSON = 'Describe Each Row', 'Describe the Table', 'Describe Row in Context', and 'Describe a JSON Object' (project types). In these columns, a function marked ✓ is available in the project type and a function marked x is not available.

Name

Builder

Description

Row

Table

Context

JSON

abbreviateNumber

✓

Abbreviates a large number and displays it with an appropriate suffix.

✓

✓

✓

✓

abs

✓

Returns a number's absolute value.

✓

✓

✓

✓

absDiff

✓

Returns the absolute difference between two numbers.

✓

✓

✓

✓

addToAtlObject

✓

Adds key–value pairs to an ATL object.

✓

✓

✓

✓

addToDateTime

✓

Adds a duration to a datetime object.

✓

✓

✓

✓

anomalyDetectorContextual

✓

Detects anomalies in a seasonal context using the selected time granularity.

✓

✓

✓

✓

anomalyDetectorExtremeValues

✓

Detects subsets of contiguous values that are extremely high or extremely low.

✓

✓

✓

✓

anomalyDetectorOutliers

✓

Applies Grubbs’ test to detect anomalies (statistical outliers) in a series of numbers.

✓

✓

✓

✓

asBoolean

✓

Converts a reserved-list value to a Boolean value.

✓

✓

✓

✓

asDateTime

✓

Converts the input value to a datetime object.

✓

✓

✓

✓

asDays

✓

Converts a duration from seconds to days.

✓

✓

✓

✓

asHours

✓

Converts a duration from seconds to hours.

✓

✓

✓

✓

asJson

x

Converts a JSON string to a JSON object.

✓

✓

✓

✓

asList

✓

Converts the input value to a list.

✓

✓

✓

✓

asMilliseconds

✓

Converts a duration from seconds to milliseconds.

✓

✓

✓

✓

asMinutes

✓

Converts a duration from seconds to minutes.

✓

✓

✓

✓

asMonths

✓

Converts a duration from seconds to months.

✓

✓

✓

✓

asNumber

✓

Converts a numeric string to a number.

✓

✓

✓

✓

asString

✓

Converts a non-string value to a string.

✓

✓

✓

✓

asTable (deprecated)

✓

Converts the output of a script to a table region. Function deprecated — see topic for details.

x

✓

✓

x

asWeeks

✓

Converts a duration from seconds to weeks.

✓

✓

✓

✓

asYears

✓

Converts a duration from seconds to years.

✓

✓

✓

✓

averageVal (deprecated)

x

Calculates the average value for a set of numbers. This function has been superseded by mean.

✓

✓

✓

✓

cell

✓

Selects a cell from a table.

x

✓

✓

x

cellInRegion

✓

Selects a cell from a table region.

x

✓

✓

x

charAt

✓

Returns the character at the given index.

✓

✓

✓

✓

chooseAtRandom

✓

Randomly selects and outputs one of the input expressions.

✓

✓

✓

✓

columnNames

✓

Returns a list of column names in a table.

x

✓

✓

x

columns

✓

Selects columns from a table.

x

✓

✓

x

columnsInRegion

✓

Selects columns from a table region.

x

✓

✓

x

concat

✓

Concatenates the input values into a single list.

✓

✓

✓

✓

consolePrint

✓

Generates a log entry for the console log area in Preview Mode.

✓

✓

✓

✓

contains

✓

Tests if the input data contains a specific item.

✓

✓

✓

✓

count

✓

Counts how many times a given value appears in the input data.

✓

✓

✓

✓

countable

✓

Generates a countable noun phrase in grammatically correct form.

✓

✓

✓

✓

countryAdjective

✓

Converts the input country name to its adjective form.

✓

✓

✓

✓

countryDeterminer

✓

Adds a 'the' determiner to the input country name, if one is required.

✓

✓

✓

✓

createAtlObject

✓

Creates an ATL object from the given keys and values.

✓

✓

✓

✓

currency (deprecated)

x

Formats a number as a currency expression. This function has been superseded by currencyFormat.

✓

✓

✓

✓

currencyFormat

✓

Formats a number as a currency expression.

✓

✓

✓

✓

dateTimeDifference

✓

Returns the absolute difference (in seconds) between two datetime objects.

✓

✓

✓

✓

day

✓

Returns a number representing the day part of a datetime object.

✓

✓

✓

✓

decodeHtml

✓

Ensures Studio interprets the input string as HTML.

✓

✓

✓

✓

diff

✓

Returns the difference between two numbers.

✓

✓

✓

✓

direction

✓

Returns the change direction for a series of numbers.

✓

✓

✓

✓

div

✓

Divides one number by another.

✓

✓

✓

✓

durationAsList

✓

Converts a duration given in seconds to a list of seven duration values.

✓

✓

✓

✓

encodeHtml

✓

Encodes HTML tags in a string so they aren't processed as HTML.

✓

✓

✓

✓

endsWith

✓

Tests if a string ends with the given suffix.

✓

✓

✓

✓

filter

x

Filters a list or list-like object.

✓

✓

✓

✓

filterRows

x

Filters a table or table region.

x

✓

✓

x

flattenLists

✓

Flattens a list of lists into a single list.

✓

✓

✓

✓

forAll

x

Loops through a list (or array) and applies a function to all items.

✓

✓

✓

✓

forAllCellsByColumn

x

Loops through a column and applies a function to all cell values.

x

✓

✓

x

forAllCellsByRow

x

Loops through a row and applies a function to all cell values.

x

✓

✓

x

forAllColumns

x

Loops through all columns and applies a function to all cell values.

x

✓

✓

x

forAllRows

x

Loops through all rows and applies a function to all cell values.

x

✓

✓

x

formatDateTime

✓

Formats a datetime object using a format pattern or locale.

✓

✓

✓

✓

formatDuration

✓

Formats the input duration as a text string.

✓

✓

✓

✓

formatNumber (deprecated)

x

Formats a number using the given pattern. This function has been superseded by numberFormat.

✓

✓

✓

✓

frequency

✓

Returns a frequency distribution list.

✓

✓

✓

✓

gender

✓

Returns the gender of the input name (e.g. 'male' for 'John').

✓

✓

✓

✓

getCurrentTime

✓

Returns a datetime object for current date and time.

✓

✓

✓

✓

getRandomInteger

✓

Returns a randomly selected integer.

✓

✓

✓

✓

getRandomNumber

✓

Returns a randomly selected decimal number.

✓

✓

✓

✓

getTimeZone

✓

Returns the timezone ID (or offset) for a datetime object.

✓

✓

✓

✓

groupByJson

x

Groups JSON arrays with matching values in one or more fields. For each group, the function then aggregates the data for one or more fields.

✓

✓

✓

✓

groupByJsonObject

x

Groups JSON objects with matching values in one or more fields. For each group, the function then aggregates the data for one or more fields.

✓

✓

✓

✓

groupByTable

✓

Groups table rows with matching values in one or more columns. For each group, the function aggregates the data for one or more columns.

x

✓

✓

x

groupByVarianceJson

x

Calculates the variance between the sum-aggregated values for two measures (base and comparison), then breaks the variance down by one or more grouping dimensions.

x

x

x

✓

groupByVarianceTable

x

Calculates the variance between the sum-aggregated values for two measures (base and comparison), then breaks the variance down by one or more grouping dimensions.

x

✓

✓

x

hasKey

✓

Tests if the input object contains the given key name.

✓

✓

✓

✓

hour

✓

Returns a number representing the hours part of a datetime object.

✓

✓

✓

✓

indexOf

✓

Returns the first index at which a given value is found.

✓

✓

✓

✓

inflectNoun

✓

Returns the inflected form of a noun.

✓

✓

✓

✓

inflectVerb

✓

Returns the inflected form of a verb.

✓

✓

✓

✓

initCap

✓

Capitalizes the first letter of the input string.

✓

✓

✓

✓

isCountry

✓

Tests if a name is recognized by countryAdjective and countryDeterminer.

✓

✓

✓

✓

isDateTime

✓

Tests if the input string can be parsed to create a datetime object.

✓

✓

✓

✓

isEmpty

x

Tests if a string, list, table cell, or JSON object is empty.

✓

✓

✓

✓

isNotEmpty

x

Tests if a string, list, table cell, or JSON object is not empty.

✓

✓

✓

✓

isNumber

✓

Tests if the input value can be parsed as a number.

✓

✓

✓

✓

isTypeList

✓

Tests if the data type of the input value is a list.

✓

✓

✓

✓

isTypeNumber

✓

Tests if the data type of the input value is a number.

✓

✓

✓

✓

isTypeString

✓

Tests if the data type of the input value is a string.

✓

✓

✓

✓

joinStrings

✓

Joins a set of strings to form a single string.

✓

✓

✓

✓

keys

✓

Returns a list of all keys in a JSON or ATL object.

✓

✓

✓

✓

len

✓

Returns the length of a variable — e.g. the number of values in a list.

✓

✓

✓

✓

list

✓

Presents the input values as a punctuated list.

✓

✓

✓

✓

lower

✓

Converts all input strings to lowercase.

✓

✓

✓

✓

makeList

x

Makes a data list from zero or more values.

✓

✓

✓

✓

map

x

Loops through a list, applies a function to each value, and returns a new list.

✓

✓

✓

✓

mapRows

x

Loops through rows in a table or table region, applies a mapping function to the values in one or more columns, and returns the amended table.

✓

✓

✓

x

max

✓

Finds all cells containing the maximum value.

x

✓

✓

x

maxVal

✓

Returns the maximum value in a set of numbers.

✓

✓

✓

✓

mean

✓

Returns the mean (average value) for a set of numbers.

✓

✓

✓

✓

median

✓

Returns the median value for a set of numbers.

✓

✓

✓

✓

min

✓

Finds all cells containing the minimum value.

x

✓

✓

x

minute

✓

Returns a number representing the minutes part of a datetime object.

✓

✓

✓

✓

minVal

✓

Returns the minimum value in a set of numbers.

✓

✓

✓

✓

mode

✓

Returns the mode for a set of values.

✓

✓

✓

✓

month

✓

Returns a number representing the month part of a datetime object.

✓

✓

✓

✓

monthAsNumber

✓

Returns the number for the input month name — e.g. 3 for March.

✓

✓

✓

✓

now (deprecated)

x

Returns the current time. This function has been superseded by getCurrentTime.

✓

✓

✓

✓

numberAsMonth

✓

Returns the month name for the input number — e.g. March for 3.

✓

✓

✓

✓

numberAsWeekday

✓

Returns the weekday name for the input number — e.g. Tuesday for 2.

✓

✓

✓

✓

numberFormat

✓

Formats a number using the given pattern or locale.

✓

✓

✓

✓

numColumns

x

Returns the number of columns in your table.

x

✓

✓

x

numRows

x

Returns the number of rows in your table.

x

✓

✓

x

numToWords

✓

Converts a number to words.

✓

✓

✓

✓

pairwiseMap

x

Pairs values from two lists, applies a function to each pairing, and returns a new list of values.

✓

✓

✓

✓

parseDateTime

✓

Parses a string to create a datetime object.

✓

✓

✓

✓

parseDuration

✓

Converts a duration string to a number representing the duration in seconds.

✓

✓

✓

✓

pearsonCorrelation

✓

Returns the Pearson correlation coefficient for two series of numbers.

✓

✓

✓

✓

percentage

✓

Calculates a percentage value — (base/whole) * 100.

✓

✓

✓

✓

percentageChange

✓

Calculates the percentage change between two numbers.

✓

✓

✓

✓

percentageChangeAcrossSeries

✓

Calculates the percentage change across a series of numbers.

x

✓

✓

x

percentile

✓

Returns the nth percentile for a set of numbers.

✓

✓

✓

✓

power

✓

Returns the result of a number raised to a power.

✓

✓

✓

✓

precision

✓

Defines the display precision for a number.

✓

✓

✓

✓

product

✓

Returns the result of multiplying two or more numbers.

✓

✓

✓

✓

pronoun

✓

Returns the correct pronoun for the input name.

✓

✓

✓

✓

rank

✓

Returns the rank of a value in a set of numbers.

✓

✓

✓

✓

realise

✓

Generates text from lex rules and input data.

x

x

x

✓

reduce

x

Reduces a list of values to a single value.

✓

✓

✓

✓

removeFromAtlObject

✓

Removes key–value pairs from an ATL object.

✓

✓

✓

✓

rollingCorrelation

✓

Performs a rolling correlation analysis for two series of numbers.

✓

✓

✓

✓

root

✓

Calculates the nth root of a number.

✓

✓

✓

✓

round

✓

Rounds a number to a specific number of decimal places.

✓

✓

✓

✓

rowNames

✓

Returns a list of row names in a table.

x

✓

✓

x

rows

✓

Selects rows from a table.

x

✓

✓

x

rowsInRegion

✓

Selects rows from a table region.

x

✓

✓

x

second

✓

Returns a number representing the seconds part of a datetime object.

✓

✓

✓

✓

setTimeZone

✓

Sets the timezone ID (or offset) for a datetime object.

✓

✓

✓

✓

sign

✓

Returns the sign of a number (1 if positive, -1 if negative, and 0 if zero).

✓

✓

✓

✓

sort

x

Sorts a list or list-like object such as a JSON array.

✓

✓

✓

✓

sortByColumn

x

Sorts a table region by the values in one column.

x

✓

✓

x

sortByColumnNumbers

x

Sorts a table region by a single column's values in ascending order.

x

✓

✓

x

sortByColumnNumbersReverse

x

Sorts a table region by a single column's values in descending order.

x

✓

✓

x

sortByColumnStrings

x

Sorts a table region by a single column's values in alphabetical order.

x

✓

✓

x

sortByColumnStringsReverse

x

Sorts a table region by a single column's values in reverse-alphabetical order.

x

✓

✓

x

sortByRow

x

Sorts a table region by the values in one row.

x

✓

✓

x

sortByRowNumbers

x

Sorts a table region by a single row's values in ascending order.

x

✓

✓

x

sortByRowNumbersReverse

x

Sorts a table region by a single row's values in descending order.

x

✓

✓

x

sortByRowStrings

x

Sorts a table region by a single row's values in alphabetical order.

x

✓

✓

x

sortByRowStringsReverse

x

Sorts a table region by a single row's values in reverse-alphabetical order.

x

✓

✓

x

sortDateTimes

✓

Sorts datetime objects in chronological order.

✓

✓

✓

✓

sortDateTimesReverse

✓

Sorts datetime objects in reverse-chronological order.

✓

✓

✓

✓

sortedColumns

✓

Selects columns from a table and presents them in the selected order.

x

✓

✓

x

sortedColumnsInRegion

✓

Selects columns from a table region and presents them in the selected order.

x

✓

✓

x

sortedRows

✓

Selects rows from a table and presents them in the selected order.

x

✓

✓

x

sortedRowsInRegion

✓

Selects rows from a table region and presents them in the selected order.

x

✓

✓

x

sortMonthNames

✓

Sorts month names in order of calendar month.

✓

✓

✓

✓

sortNumbers

x

Sorts numeric values in ascending order.

✓

✓

✓

✓

sortNumbersReverse

x

Sorts numeric values in descending order.

✓

✓

✓

✓

sortStrings

x

Sorts string values in alphabetical order.

✓

✓

✓

✓

sortStringsReverse

x

Sorts string values in reverse-alphabetical order.

✓

✓

✓

✓

split

✓

Splits a string around matches for specific characters.

✓

✓

✓

✓

standardDeviation

✓

Returns the standard deviation for a set of numbers.

✓

✓

✓

✓

startsWith

✓

Tests if a string starts with the given prefix.

✓

✓

✓

✓

sublist

✓

Returns a sublist of the input list.

✓

✓

✓

✓

substitute

✓

Replaces one or more text strings with another text string.

✓

✓

✓

✓

substring

✓

Returns a substring of the input string.

✓

✓

✓

✓

subtractFromDateTime

✓

Subtracts a duration from a datetime object.

✓

✓

✓

✓

sum

✓

Sums the input values (numbers or lists).

✓

✓

✓

✓

titleCase

✓

Capitalizes the first letter of each word in the input string.

✓

✓

✓

✓

today (deprecated)

x

Returns the current date. This function has been superseded by getCurrentTime.

✓

✓

✓

✓

top

x

Returns the top N values from the input data.

✓

✓

✓

✓

topColumns

x

Returns the top N columns in a table region.

x

✓

✓

x

topRows

x

Returns the top N rows in a table region.

x

✓

✓

x

toReachThreshold

✓

Counts the summed values required to reach a target threshold.

✓

✓

✓

✓

totalVal

✓

Returns the total value for a set of numbers.

✓

✓

✓

✓

translateTimeZone

✓

Translates a datetime object into its equivalent in a different timezone.

✓

✓

✓

✓

trim

✓

Trims leading, trailing, and internal whitespace from a string.

✓

✓

✓

✓

truncate

✓

Truncates a number to its integer part.

✓

✓

✓

✓

unique

✓

Returns a list of unique values (removes duplicates).

✓

✓

✓

✓

upper

✓

Converts all input strings to uppercase.

✓

✓

✓

✓

value

✓

Returns the value in a table cell or single-value list.

✓

✓

✓

✓

values

✓

Returns a list of all values in a JSON or ATL object.

✓

✓

✓

✓

variance

✓

Returns the variance value for a set of numbers.

✓

✓

✓

✓

weekdayAsNumber

✓

Returns the number for the input weekday name — e.g. 2 for Tuesday.

✓

✓

✓

✓

year

✓

Returns a number representing the year part of a datetime object.

✓

✓

✓

✓

zip

x

Pairs values from two lists and returns a list of pairs.

✓

✓

✓

✓

zipWithIndex

x

Takes a list, pairs each value with its index number, and returns a list of pairs.

✓

✓

✓

✓