> For the complete documentation index, see [llms.txt](https://docs.ninox.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ninox.com/ninox-scripting/functions-and-script-library/functions-library.md).

# Functions library

Find documented Ninox functions fast in one A–Z reference. Use this page for quick lookup.

Use [Work with functions](/ninox-scripting/automate-your-workflows/work-with-functions.md) to explore functions by category.

Jump to: [A](/ninox-scripting/functions-and-script-library/functions-library.md#a) · [C](/ninox-scripting/functions-and-script-library/functions-library.md#c) · [D](/ninox-scripting/functions-and-script-library/functions-library.md#d) · [E](/ninox-scripting/functions-and-script-library/functions-library.md#e) · [F](/ninox-scripting/functions-and-script-library/functions-library.md#f) · [G](/ninox-scripting/functions-and-script-library/functions-library.md#g) · [H](/ninox-scripting/functions-and-script-library/functions-library.md#h) · [I](/ninox-scripting/functions-and-script-library/functions-library.md#i) · [J](/ninox-scripting/functions-and-script-library/functions-library.md#j) · [L](/ninox-scripting/functions-and-script-library/functions-library.md#l) · [M](/ninox-scripting/functions-and-script-library/functions-library.md#m) · [N](/ninox-scripting/functions-and-script-library/functions-library.md#n) · [O](/ninox-scripting/functions-and-script-library/functions-library.md#o) · [P](/ninox-scripting/functions-and-script-library/functions-library.md#p) · [Q](/ninox-scripting/functions-and-script-library/functions-library.md#q) · [R](/ninox-scripting/functions-and-script-library/functions-library.md#r) · [S](/ninox-scripting/functions-and-script-library/functions-library.md#s) · [T](/ninox-scripting/functions-and-script-library/functions-library.md#t) · [U](/ninox-scripting/functions-and-script-library/functions-library.md#u) · [W](/ninox-scripting/functions-and-script-library/functions-library.md#w) · [Y](/ninox-scripting/functions-and-script-library/functions-library.md#y)

## **A**

### abs()

Return the absolute value of a number.\
`abs(number)`

* `number` the value to convert

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#get-a-positive-value-with-abs).

***

### acos()

Return the arccosine of a value between `-1` and `1`.\
`acos(number)`

* `number` the cosine value

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#calculate-the-arccosine-with-acos).

***

### age()

Return the number of full years since a date.\
`age(date)`

* `date` the reference date

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#calculate-age-with-age).

***

### alert()

Show a simple message with an OK button.\
`alert(any)`

* `any` the message or value to show

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/user-interface.md#show-a-simple-message-with-alert).

***

### appendTempFile()

Add text to an existing temporary file.\
`appendTempFile(link, string)` or\
`appendTempFile(string, string)`

* `link` or `string` (first argument) the temporary file link
* `string` (second argument) the content to append

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/files-and-export.md#create-files-and-append-content-with-createtempfile-and-appendtempfile).

***

### appointment()

Create an appointment from start and end, or from start and duration.\
`appointment(any, any)`

* `any` first argument: start or end value
* `any` second argument: end value or duration

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#create-appointments).

***

### array()

Merge two arrays into one array.\
`array([any], [any])`

* `[any]` first array
* `[any]` second array

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/records-and-tables.md#merge-two-arrays-with-array).

***

### asin()

Return the arcsine of a value between `-1` and `1`.\
`asin(number)`

* `number` the sine value

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#calculate-the-arcsine-with-asin).

***

### atan()

Return the arctangent of a number.\
`atan(number)`

* `number` the value or quotient

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#calculate-the-arctangent-with-atan).

***

### atan2()

Return the arctangent of one value divided by another.\
`atan2(number, number)`

* `number` first argument: numerator
* `number` second argument: denominator

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#return-the-arctangent-of-a-quotient-with-atan2).

***

### avg()

Return the average of numeric values.\
`avg([number])`

* `[number]` an array or numeric field list

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#average-values-with-avg).

***

## **C**

### capitalize()

Capitalize the first letter of each word.\
`capitalize(string)`

* `string` the text to convert

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#change-the-letter-case-of-text).

***

### ceil()

Round a number up to the next integer.\
`ceil(number)`

* `number` the value to round

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#round-up-with-ceil).

***

### chosen()

Return selected values from a multiple choice field, or check whether a value is selected.\
`chosen(multi)`, `chosen(multi, string)`, `chosen(multi, number)`, `chosen(multi, [number])`

* `multi` a multiple choice field
* `string` a label to check
* `number` an option ID
* `[number]` several option IDs

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#check-or-return-selected-values-with-chosen).

***

### clientLang()

Return the current client language code.\
`clientLang()`

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/users-and-roles.md#detect-the-current-language-with-clientlang).

***

### closeAllRecords()

Close all open form views.\
`closeAllRecords()`

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/user-interface.md#use-closerecord-and-closeallrecords-to-close-open-form-views).

***

### closeFullscreen()

Exit full screen mode and return to the previous view.\
`closeFullscreen()`

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/user-interface.md#enter-or-leave-full-screen-with-openfullscreen-and-closefullscreen).

***

### closeRecord()

Close the current record view.\
`closeRecord()`

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/user-interface.md#use-closerecord-and-closeallrecords-to-close-open-form-views).

***

### cnt()

Count non-empty items in a list or selection. This is the short form of `count`.\
`cnt([any])`

* `[any]` the list or selection to count

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/records-and-tables.md#count-items-with-count-and-cnt).

***

### color()

Return a color value.\
`color(name)`, `color(r, g, b)`, `color(r, g, b, a)`, `color(choice)`

* `name` a color name or hex code
* `r, g, b` RGB values
* `a` opacity
* `choice` a choice field with colors

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#style-text-with-colors-and-icons-using-styled-and-color).

***

### concat()

Return one comma-separated text string.\
`concat([any])` or `concat(value1, value2, ...)`

* `[any]` an array, selection, or multiple choice field
* `value1, value2, ...` values to combine

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#combine-pieces-of-text-into-one-line).

***

### contains()

Check whether text or a list contains an exact value.\
`contains(string, string)` or `contains([any], any)`

* `string` the text to search; second argument the value to find
* `[any]` the array to search; second argument the array to find

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#check-if-text-or-a-list-contains-an-exact-value).

***

### cos()

Return the cosine of an angle in radians.\
`cos(number)`

* `number` the angle in radians

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#calculate-the-cosine-with-cos).

***

### count()

Count non-empty items in a list or selection.\
`count([any])`

* `[any]` the list or selection to count

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/records-and-tables.md#count-items-with-count-and-cnt).

***

### createTempFile() <a href="#createtempfile" id="createtempfile"></a>

Create a temporary file with initial content. `createTempFile(string, string)`

* `string` (first argument) the initial content
* `string` (second argument) the filename

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/files-and-export.md#create-files-and-append-content-with-createtempfile-and-appendtempfile).

***

### createTextFile()

Create a plain text file.\
`createTextFile(nid, string, string)`, `createTextFile(nid, string, string, any)`

* `nid` optional target record
* `string` content and filename
* `any` optional settings such as encoding

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/files-and-export.md#build-files-with-createtextfile).

***

### createXLSX()

Create an Excel file from records or a workbook definition.\
`createXLSX(nid, any, string)`

* `nid` target record
* `any` data and workbook or worksheet definition
* `string` filename

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/files-and-export.md#export-data-with-createxlsx).

***

### createZipFile()

Bundle files into one ZIP archive.\
`createZipFile(nid, [file], string)`

* `nid` optional target record
* `[file]` files to include
* `string` ZIP filename

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/files-and-export.md#bundle-files-with-createzipfile).

***

## **D**

### databaseId()

Return the ID of the current app (database).\
`databaseId()`

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/records-and-tables.md#get-internal-ids-with-tableid-and-fieldid-databaseid-and-teamid).

***

### date()

Create a date, or strip the time part from a time-based value.\
`date(any)` or `date(year, month, day)`

* `any` a date, datetime, or Unix milliseconds
* `year`, `month`, `day` the date parts

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#create-fixed-values-with-date-time-and-datetime).

***

### datetime()

Create a local timestamp.\
`datetime(milliseconds)`, `datetime(year, month, day[, hour[, minute[, second[, millisecond]]]])`, or `datetime(date, time)`

* `milliseconds` Unix time in milliseconds
* date and time parts the local timestamp values
* `date`, `time` separate date and time values

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#create-fixed-values-with-date-time-and-datetime).

***

### day()

Return the day of the month.\
`day(date)`, `day(timestamp)`, `day(appointment)`

* `date` a date value
* `timestamp` a timestamp or datetime value
* `appointment` an appointment value; Ninox uses the start date

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#get-year-month-and-day-with-year-month-and-day).

***

### days()

Return the number of calendar days between two dates.\
`days(date, date)`

* first argument start date; second argument end date

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#count-days-between-two-dates-with-days).

***

### degrees()

Convert radians to degrees.\
`degrees(number)`

* `number` the angle in radians

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#convert-radians-to-degrees-with-degrees).

***

### dialog()

Show a dialog and return the selected answer.\
`dialog(string, string, [string])`

* first argument title
* second argument message
* third argument answer options

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/user-interface.md#ask-for-confirmation-with-dialog).

***

### duplicate()

Create a copy of a record.\
`duplicate(nid)`

* `nid` the record to copy

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/records-and-tables.md#copy-a-record-with-duplicate).

***

### duration()

Return a time span from an appointment or between two values.\
`duration(appointment)` or `duration(end, start)`

* `appointment` the appointment to measure
* `end`, `start` the later and earlier values

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#measure-elapsed-time-with-duration).

***

## **E**

### email()

Return an email value from another value.\
`email(any)`

* `any` the value to convert

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/integration-and-http.md#work-with-an-email-value-using-email).

***

### endof()

Return the end of an appointment or a calendar period.\
`endof(appointment)` or `endof(date, period)`

* `appointment` the appointment value
* `date` the reference date
* `period` a period such as `"month"` or `"week"`

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#get-an-appointments-start-or-end-timestamp).

***

### eval()

Execute text as a script.

`eval(string, nid)`

* `string` text containing calculations or a Ninox script
* `nid` the record to which the script applies

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/system-and-flow-control.md#execute-strings-as-formulas-and-inspect-data-with-eval).

***

### even()

Check whether a number is even.\
`even(number)`

* `number` the value to test

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#check-if-a-number-is-even-with-even).

***

### exp()

Return `e` raised to a power.\
`exp(number)`

* `number` the exponent

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#use-the-natural-exponential-function-with-exp).

***

### extractx()

Extract the first regex match from text.\
`extractx(string, string)`, `extractx(string, string, string)`, `extractx(string, string, string, string)`

* first argument the source text
* second argument the regex pattern
* third argument optional flags
* fourth argument optional capture expression such as `$1`

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#extract-text-with-a-regular-expression-using-extractx).

***

## **F**

### fieldId()

Return the internal ID of a field.\
`fieldId(field)`, `fieldId(nid, string)`, `fieldId(string, string)`

* `field` the field itself
* `nid` a record from the table
* `string` field name, or table name and field name

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/records-and-tables.md#get-internal-ids-with-tableid-and-fieldid-databaseid-and-teamid).

***

### file()

Return one file reference.\
`file(nid, string)`

* `nid` the record with the attachment
* `string` the exact filename

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/files-and-export.md#return-one-or-more-file-objects-with-file-and-files).

***

### fileMetadata()

Return metadata such as name, size, and modified date.

`fileMetadata(nid, string)`

* `nid` the record with the attachment
* `string` the exact filename

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/files-and-export.md#check-file-details-with-filemetadata).

***

### files()

Return several file references as an array.\
`files(nid)`

* `nid` the record with the attachments

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/files-and-export.md#return-one-or-more-file-objects-with-file-and-files).

***

### fileUrl()

Return a download link for a file.\
`fileUrl(nid, string)`

* `nid` the record with the attachment
* `string` the exact filename

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/files-and-export.md#create-a-link-with-fileurl).

***

### first()

Return the first item from a list or selection.\
`first([any])`

* `[any]` the list or selection

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/records-and-tables.md#get-the-first-or-last-item-with-first-and-last).

***

### floor()

Round a number down to the next integer.\
`floor(number)`

* `number` the value to round

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#round-down-with-floor).

***

### format()

Convert numbers, dates, times, and appointments to text with a format pattern.\
`format(number, pattern)`, `format(date, pattern[, language])`, `format(time, pattern)`, `format(timestamp, pattern[, language])`, `format(appointment, pattern[, language])`

* first argument the value to format
* `pattern` the format expression
* `language` optional language code

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#turn-numbers-dates-and-times-into-text-and-format-them).

***

### formatJSON()

Convert a JSON object to a JSON string.\
`formatJSON(JSON)`

* `JSON` the object to convert

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#turn-a-json-object-into-text-with-formatjson).

***

### formatXML()

Convert a JSON object to XML text.\
`formatXML(JSON)` or `formatXML(JSON, boolean)`

* `JSON` the object to convert
* `boolean` whether to pretty-print the output

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#convert-json-to-xml-text-with-formatxml).

***

## **G**

### get()

Read a field by name, or read a stored key-value entry.\
`get(nid, string)` or `get(string)`

* `nid` the record to read from
* `string` the field name, field ID, or storage key

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/records-and-tables.md#read-and-update-fields-with-get-and-set).

***

## **H**

### html()

Return a rich text value with HTML rendering.\
`html(any)`

* `any` the value or HTML string to render

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#style-text-with-colors-and-icons-using-styled-and-color).

***

### http()

Send an HTTP request.\
`http(string, string)`, `http(string, string, JSON)`, `http(string, string, JSON, any)`, `http(string, string, JSON, [file])`, `http(string, string, JSON, any, [file])`

* first argument HTTP method such as `"GET"` or `"POST"`
* second argument target URL
* `JSON` optional headers
* `any` optional body
* `[file]` optional uploaded files

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/integration-and-http.md#call-an-api-with-http).

***

## **I**

### icon()

Return an icon value.\
`icon(choice)` or `icon(string)`

* `choice` a choice field with an icon
* `string` the icon name

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#style-text-with-colors-and-icons-using-styled-and-color).

***

### index()

Return the position of the first match in text or an array.\
`index(text, search)` or `index([any], any)`

* first argument the text or array to search
* second argument the value to find

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#find-the-position-of-text-inside-another-text).

***

### importFile()

Import a file into Ninox.

`importFile(nid, string)`, `importFile(nid, link)`, `importFile(nid, string, string)`, `importFile(nid, link, string)`

* `any` a file source
* `nid` the target record
* `string` or `link` the source URL or file link
* final `string` optional filename

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/files-and-export.md#import-a-file-with-importfile).

***

### isAdminMode()

Check whether the client UI is in admin mode.\
`isAdminMode()`

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/users-and-roles.md#check-admin-status).

***

### item()

Return one item from a list or one value from a JSON object.\
`item([any], number)`, `item(JSON, number)`, `item(JSON, string)`

* `[any]` the list or selection
* `number` zero-based position or numeric JSON key
* `string` JSON key

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/records-and-tables.md#get-one-item-by-position-with-item).

***

## **J**

### join()

Combine text values into one string with a custom separator.\
`join([string], string)`

* `[string]` the list of text values
* `string` the separator

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#combine-a-list-of-text-values-into-one-string).

***

## **L**

### last()

Return the last item from a list or selection.\
`last([any])`

* `[any]` the list or selection

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/records-and-tables.md#get-the-first-or-last-item-with-first-and-last).

***

### length()

Count characters in text or items in a list.\
`length(string)` or `length([any])`

* `string` the text to count
* `[any]` the array to count

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#measure-the-size-of-text-or-lists).

***

### ln()

Return the natural logarithm of a number.\
`ln(number)`

* `number` the input value

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#calculate-the-natural-logarithm-with-ln).

***

### loadFileAsBase64()

Return file content as a Base64 string.\
`loadFileAsBase64(file)` or `loadFileAsBase64(nid, string)`

* `file` a file object or file field
* `nid` the record with the attachment
* `string` the exact filename

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/files-and-export.md#return-file-content-with-loadfileasbase64-and-loadfileasbase64url).

***

### loadFileAsBase64URL()

Return file content as a Base64 data URL.\
`loadFileAsBase64URL(file)` or `loadFileAsBase64URL(nid, string)`

* `file` a file object or file field
* `nid` the record with the attachment
* `string` the exact filename

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/files-and-export.md#return-file-content-with-loadfileasbase64-and-loadfileasbase64url).

***

### location()

Create a location value from a title and coordinates.\
`location(string, number, number)`

* `string` the location title
* second argument latitude
* third argument longitude

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/location-and-devices.md#work-with-a-location-value).

***

### log()

Return a logarithm with base `10` or another base.\
`log(number)` or `log(number, number)`

* first argument the input value
* second argument optional base

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#calculate-logarithms-with-other-bases-using-log).

***

### lower()

Convert text to lowercase.\
`lower(string)`

* `string` the text to convert

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#change-the-letter-case-of-text).

***

### lpad()

Pad text on the left to a fixed length.\
`lpad(string, length, padding)`

* `string` the source text
* `length` the target length
* `padding` the padding characters

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#pad-text-to-a-fixed-length-with-lpad-and-rpad).

***

## **M**

### max()

Return the highest number or latest date-like value.\
`max([any])`

* `[any]` the comparable values

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#find-the-highest-or-latest-value-with-max).

***

### min()

Return the lowest number or earliest date-like value.\
`min([any])`

* `[any]` the comparable values

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#find-the-lowest-or-earliest-value-with-min).

***

### month()

Return the month number from `1` to `12`.\
`month(date)`, `month(timestamp)`, `month(appointment)`

* `date` a date value
* `timestamp` a timestamp or datetime value
* `appointment` an appointment value; Ninox uses the start date

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#get-year-month-and-day-with-year-month-and-day).

***

### monthIndex()

Return the month number from a month name.\
`monthIndex(text)`

* `text` the month name

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#convert-names-to-numbers-with-monthindex-and-weekdayindex).

***

### monthName()

Return a month name.\
`monthName(date)`, `monthName(date, language)`, `monthName(number)`, `monthName(number, language)`

* `date` or `number` the source month
* `language` optional language code

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#get-readable-names-with-monthname-and-weekdayname).

***

## **N**

### ninoxApp()

Return the current app or client context.\
`ninoxApp()`

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/system-and-flow-control.md#detect-the-current-app-with-ninoxapp).

***

### now()

Return the current date and time.\
`now()`

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#get-the-current-date-and-time-with-now).

***

### number()

Convert a value to a number.\
`number(any)`

* `any` the value to convert

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#turn-a-value-into-a-number-with-number).

***

### numbers()

Return selected IDs from a multiple choice field.\
`numbers(multi)` or `numbers(dmulti)`

* `multi` a multiple choice field
* `dmulti` a dynamic multiple choice field

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#get-ids-from-multiple-choice-fields-with-numbers).

***

## **O**

### odd()

Check whether a number is odd.\
`odd(number)`

* `number` the value to test

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#check-if-a-number-is-odd-with-odd).

***

### openFullscreen()

Opens a record in its form view in full screen.\
`openFullscreen(nid)`

* `nid` the record to open

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/user-interface.md#enter-or-leave-full-screen-with-openfullscreen-and-closefullscreen).

***

### openPage()

Open a page by name.\
`openPage(string)`

* `string` page label or internal name

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/user-interface.md#open-a-page-with-openpage).

***

### openPrintLayout()

Open a record in a print layout.\
`openPrintLayout(nid, string)`

* `nid` the record to open
* `string` the print layout name

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/user-interface.md#open-a-print-layout-with-openprintlayout).

***

### openRecord()

Opens a record in its table's form view.\
`openRecord(nid)`

* `nid` the record to open

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/user-interface.md#open-a-record-with-openrecord).

***

### openTable()

Open a table by name.\
`openTable(string)`

* `string` table name or internal name

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/user-interface.md#open-a-table-with-opentable).

***

### openURL()

Open a website, map link, or app link.\
`openURL(string)`

* `string` the URL to open

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/location-and-devices.md#open-a-website-or-link-with-openurl).

***

## **P**

### parseCSV()

Convert CSV text into rows and columns.\
`parseCSV(string, options)`

* `string` the CSV text
* `options` optional settings such as `firstLineIsHeader`, `separator`, and `textQuote`

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#turn-csv-text-into-rows-and-columns-with-parsecsv).

***

### parseJSON()

Convert a JSON string to a JSON object.\
`parseJSON(string)`

* `string` the JSON text

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#turn-a-json-string-into-a-json-object-with-parsejson).

***

### parseXML()

Convert an XML string to a JSON object.\
`parseXML(string)`

* `string` the XML text

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#turn-an-xml-string-into-a-json-object-with-parsexml).

***

### phone()

Return a phone value with a call action on supported clients.\
`phone(number)`, `phone(string)`

* `number` number value to be used as phone number
* `string` text value for phone numbers that start with `+`, include leading zeros, or contain spaces

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/location-and-devices.md#start-a-call-action-with-phone).

***

### popupRecord()

Preview a record in a popup.\
`popupRecord(nid)`

* `nid` the record to show

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/user-interface.md#call-up-a-record-with-popuprecord).

***

### pow()

Raise a number to a power.\
`pow(base, exponent)`

* `base` the starting number
* `exponent` the power to apply

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#raise-a-number-to-a-power-with-pow).

***

### printAndSaveRecord()

Generate a PDF, save it, and return a link.\
`printAndSaveRecord(nid, string)`

* `nid` the record to print
* `string` the name of the print layout to be used

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/files-and-export.md#create-and-save-a-pdf-from-a-record-with-printandsaverecord).

***

## **Q**

### quarter()

Return the quarter number from `1` to `4`.\
`quarter(date)`

* `date` a date value, or a timestamp or datetime value

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#get-weekday-week-and-quarter-with-weekday-week-and-quarter).

***

## **R**

### radians()

Convert degrees to radians.\
`radians(number)`

* `number` the angle in degrees

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#convert-degrees-to-radians-with-radians).

***

### random()

Return a random number between `0` and `1`.\
`random()`

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#create-random-numbers-with-random).

***

### range()

Build an array of consecutive numbers.\
`range(to)`, `range(from, to)`, `range(from, to, step)`

* `from` optional start value
* `to` stop value
* `step` optional increment

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#build-arrays-of-numbers-with-range).

***

### raw()

Return the internal raw text representation of a value.\
`raw(any)`

* `any` the value to inspect

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/system-and-flow-control.md#inspect-the-raw-value).

***

### record()

Return a record reference from a table and numeric record ID.\
`record(table, id)`

* `table` the table that contains the record
* `id` the numeric record ID

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/records-and-tables.md#fetch-a-record-by-id-with-record).

***

### removeFile()

Delete a file.\
`removeFile(file)` or `removeFile(nid, string)`

* `file` the file object to remove
* `nid` the record with the attachment
* `string` the exact filename

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/files-and-export.md#rename-or-remove-a-file-with-renamefile-and-removefile).

***

### removeItem()

Remove one key-value pair from a JSON object.\
`removeItem(JSON, string)`

* `JSON` the object to change
* `string` the key to remove

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/records-and-tables.md#read-stored-values-with-get-and-update-json-objects-with-setitem-and-removeitem).

***

### renameFile()

Rename a file.\
`renameFile(file, string)` or `renameFile(nid, string, string)`

* `file` the file object to rename
* `nid` the record with the attachment
* `string` current and new filenames

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/files-and-export.md#rename-or-remove-a-file-with-renamefile-and-removefile).

***

### replace()

Replace each exact match of one string with another.\
`replace(text, search, replacement)`

* `text` the source text
* `search` the text to find
* `replacement` the text to insert

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#search-and-replace-a-string-with-another).

***

### replacex()

Replace text with a regular expression.\
`replacex(text, pattern, replacement)` or `replacex(text, pattern, flags, replacement)`

* `text` the source text
* `pattern` the regex pattern
* `flags` optional regex flags
* `replacement` the replacement text

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#search-and-replace-using-patterns).

***

### round()

Round a number to an integer or decimal place.\
`round(number)` or `round(number, digits)`

* `number` the value to round
* `digits` optional number of decimal places

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#round-to-an-integer-or-decimal-place-with-round).

***

### rpad()

Pad text on the right to a fixed length.\
`rpad(string, length, padding)`

* `string` the source text
* `length` the target length
* `padding` the padding characters

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#pad-text-to-a-fixed-length-with-lpad-and-rpad).

***

### rsort()

Sort values in descending order.\
`rsort([any])`, `rsort(any, any, ...)`, `rsort([any], [any], ...)`

* arguments values or arrays of the same type

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/records-and-tables.md#sort-value-lists-with-sort-and-rsort).

***

## **S**

### set()

Update a field by name or field ID.\
`set(nid, string, any)`

* `nid` the record to update
* `string` the field name or field ID
* `any` the new value

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/records-and-tables.md#read-and-update-fields-with-get-and-set).

***

### setItem()

Add or update one key-value pair in a JSON object.\
`setItem(JSON, string, any)`

* `JSON` the object to change
* `string` the key to update
* `any` the new value

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/records-and-tables.md#read-stored-values-with-get-and-update-json-objects-with-setitem-and-removeitem).

***

### sign()

Return whether a number is negative or non-negative.\
`sign(number)`

* `number` the value to check

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#get-the-sign-of-a-number-with-sign).

***

### sin()

Return the sine of an angle.\
`sin(number)`

* `number` the angle value

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#calculate-the-sine-with-sin).

***

### sleep()

Pause a script for a number of milliseconds.\
`sleep(number)`

* `number` the delay in milliseconds

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/system-and-flow-control.md#pause-a-script-briefly).

***

### slice()

Return part of a list or part of a string.\
`slice([any], from, to)` or `slice(string, from, to)`

* first argument the list or text to slice
* `from` inclusive start position
* `to` exclusive end position

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/records-and-tables.md#return-part-of-a-list-with-slice).

***

### sort()

Sort values in ascending order.\
`sort([any])`, `sort(any, any, ...)`, `sort([any], [any], ...)`

* arguments values or arrays of the same type

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/records-and-tables.md#sort-value-lists-with-sort-and-rsort).

***

### split()

Split text into parts at each exact separator.\
`split(text, separator)`

* `text` the source text
* `separator` the split marker

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#break-a-text-into-parts-you-can-loop-through-or-analyze).

***

### splitx()

Split text into parts with a regex pattern.\
`splitx(text, pattern)`

* `text` the source text
* `pattern` the regex split pattern

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#break-a-text-into-parts-you-can-loop-through-or-analyze).

***

### sqr()

Square a number.\
`sqr(number)`

* `number` the value to square

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#square-a-number-with-sqr).

***

### sqrt()

Return the square root of a number.\
`sqrt(number)`

* `number` the input value

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#take-the-square-root-with-sqrt).

***

### start()

Return the start timestamp of an appointment.\
`start(appointment)`

* `appointment` the appointment value

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#get-an-appointments-start-or-end-timestamp).

***

### string()

Convert a value to its raw string form.\
`string(value)`

* `value` the value to convert

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#convert-values-to-plain-text-with-string-text-and-text).

***

### styled()

Return styled text with optional colors and an icon.\
`styled(text, background)`, `styled(text, background, icon)`, `styled(text, background, fontColor, icon)`, `styled(text, JSON)`

* `text` the text to show
* `background` background color
* `fontColor` text color
* `icon` icon name
* `JSON` style definition

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#style-text-with-colors-and-icons-using-styled-and-color).

***

### substr()

Return part of a string from a start position.\
`substr(text, start)` or `substr(text, start, length)`

* `text` the source text
* `start` zero-based start position
* `length` optional number of characters

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#extract-a-specific-part-of-a-text-for-reuse).

***

### substring()

Return part of a string between two positions.\
`substring(text, start, end)`

* `text` the source text
* `start` zero-based start position
* `end` exclusive end position

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#extract-a-specific-part-of-a-text-for-reuse).

***

### sum()

Add numeric values together.\
`sum([number])`

* `[number]` an array or numeric field list

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#sum-values-with-sum).

***

## **T**

### tableId()

Return the internal ID of a table.\
`tableId(table)`, `tableId(nid)`, `tableId(string)`

* `table` the table itself
* `nid` a record from the table
* `string` the table name

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/records-and-tables.md#get-internal-ids-with-tableid-and-fieldid-databaseid-and-teamid).

***

### tan()

Return the tangent of an angle.\
`tan(number)`

* `number` the angle value

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/numbers-and-math.md#calculate-the-tangent-with-tan).

***

### teamId()

Return the ID of the current workspace.\
`teamId()`

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/records-and-tables.md#get-internal-ids-with-tableid-and-fieldid-databaseid-and-teamid).

***

### testx()

Check whether text matches a regular expression.\
`testx(string, string)` or `testx(string, string, string)`

* first argument the source text
* second argument the regex pattern
* third argument optional flags

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#check-whether-text-matches-a-regular-expression-with-testx).

***

### text()

Convert a value to readable text.\
`text(value)`

* `value` the value to convert

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#convert-values-to-plain-text-with-string-text-and-text).

***

### time()

Return the current time, extract a time, or create a time value.\
`time()`, `time(any)`, `time(hour, minute)`, `time(hour, minute, second)`, `time(hour, minute, second, millisecond)`

* `any` a time-based value or Unix milliseconds
* time parts hour, minute, second, and millisecond

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#create-fixed-values-with-date-time-and-datetime).

***

### timeinterval()

Create a duration offset.\
`timeinterval(any)` or `timeinterval(number, unit)`

* `any` a time-related value or milliseconds
* `number` the amount
* `unit` a unit such as `"hours"` or `"days"`

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#create-time-intervals-with-timeinterval).

***

### timestamp()

Convert a time-related value to a UTC-based timestamp.\
`timestamp(any)`

* `any` a date-like value or Unix milliseconds

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#convert-values-to-utc-based-timestamps-with-timestamp).

***

### today()

Return the current date without a time part.\
`today()`

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#get-todays-date-with-today).

***

### trim()

Remove spaces at the start and end of a string.\
`trim(string)`

* `string` the text to clean

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#remove-extra-spaces-with-trim).

***

## **U**

### unique()

Remove duplicate values from one or more arrays.\
`unique([any])` or `unique([any], [any], ...)`

* `[any]` the arrays to combine and deduplicate

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/records-and-tables.md#remove-duplicates-with-unique).

***

### upper()

Convert text to uppercase.\
`upper(string)`

* `string` the text to convert

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/text-and-strings.md#change-the-letter-case-of-text).

***

### url()

Return a link value from text or query data.\
`url(any)` or `url(any, JSON)`

* `any` the source value
* `JSON` optional query parameters

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/location-and-devices.md#return-a-url-value).

***

### urlDecode()

Decode URL-encoded text.\
`urlDecode(string)`

* `string` the encoded text

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/location-and-devices.md#decode-text).

***

### urlEncode()

Encode text for safe use in a URL.\
`urlEncode(string)`

* `string` the text to encode

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/location-and-devices.md#encode-text).

***

### urlOf()

Return a URL for a record.\
`urlOf(nid)`

* `nid` the record ID whose URL you want to retrieve.

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/files-and-export.md#return-a-record-url-with-urlof).

***

### user()

Return the current user, or look up a workspace user by name.\
`user()` or `user(string)`

* `string` the user name to look up

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/users-and-roles.md#get-the-current-user-with-user).

***

### userEmail()

Return the current user’s email, or another user’s email.\
`userEmail()` or `userEmail(user)`

* `user` optional user value

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/users-and-roles.md#read-user-identity-fields).

***

### userFirstName()

Return the first name of the current or given user.\
`userFirstName()` or `userFirstName(user)`

* `user` optional user value

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/users-and-roles.md#read-user-identity-fields).

***

### userFullName()

Return the full name of the current or given user.\
`userFullName()` or `userFullName(user)`

* `user` optional user value

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/users-and-roles.md#read-user-identity-fields).

***

### userHasRole()

Check whether a user has a role.\
`userHasRole(string)` or `userHasRole(user, string)`

* `string` the role name
* `user` optional user value to check

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/users-and-roles.md#check-roles).

***

### userId()

Return the internal ID of the current or given user.\
`userId()` or `userId(user)`

* `user` optional user value

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/users-and-roles.md#read-user-identity-fields).

***

### userIsAdmin()

Check whether the current user is an admin.\
`userIsAdmin()`

* none

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/users-and-roles.md#check-admin-status).

***

### userLastName()

Return the last name of the current or given user.\
`userLastName()` or `userLastName(user)`

* `user` optional user value

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/users-and-roles.md#read-user-identity-fields).

***

### userName()

Return the display name of the current or given user.\
`userName()` or `userName(user)`

* `user` optional user value

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/users-and-roles.md#read-user-identity-fields).

***

### userRole()

Return the primary role of the current or given user.\
`userRole()` or `userRole(user)`

* `user` optional user value

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/users-and-roles.md#check-roles).

***

### userRoles()

Return all roles of the current or given user.\
`userRoles()` or `userRoles(user)`

* `user` optional user value

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/users-and-roles.md#check-roles).

***

### users()

Return all collaborators in the current workspace.\
`users()`

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/users-and-roles.md#return-all-collaborators-with-users).

***

## **W**

### week()

Return the calendar week number.\
`week(date)`, `week(timestamp)`, `week(appointment)`

* `date` a date value
* `timestamp` a timestamp or datetime value
* `appointment` an appointment value; Ninox uses the start date

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#get-weekday-week-and-quarter-with-weekday-week-and-quarter).

***

### weekday()

Return the weekday number from `0` to `6`.\
`weekday(date)`, `weekday(timestamp)`, `weekday(appointment)`

* `date` a date value
* `timestamp` a timestamp or datetime value
* `appointment` an appointment value; Ninox uses the start date

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#get-weekday-week-and-quarter-with-weekday-week-and-quarter).

***

### weekdayIndex()

Return the weekday number from a weekday name.\
`weekdayIndex(text)`

* `text` the weekday name

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#convert-names-to-numbers-with-monthindex-and-weekdayindex).

***

### weekdayName()

Return a weekday name.\
`weekdayName(number)`, `weekdayName(number, language)`, `weekdayName(date)`, `weekdayName(date, language)`, `weekdayName(appointment)`, `weekdayName(appointment, language)`

* `number`, `date`, or `appointment` the source weekday
* `language` optional language code

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#get-readable-names-with-monthname-and-weekdayname).

***

### workdays()

Return the number of business days between two dates.\
`workdays(start, end)`

* `start` start date
* `end` end date

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#count-business-days-with-workdays).

***

## **Y**

### year()

Return the year number.\
`year(date)`, `year(timestamp)`, `year(appointment)`

* `date` a date value
* `timestamp` a timestamp or datetime value
* `appointment` an appointment value; Ninox uses the start date

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#get-year-month-and-day-with-year-month-and-day).

***

### yearmonth()

Return year-month like `2026/03`.\
`yearmonth(date)`, `yearmonth(timestamp)`, `yearmonth(appointment)`

* `date` a date value
* `timestamp` a timestamp or datetime value
* `appointment` an appointment value; Ninox uses the start date for the `YYYY/MM` label

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#build-reporting-keys-with-yearmonth-yearweek-and-yearquarter).

***

### yearquarter()

Return year-quarter like `2026 Q1`.\
`yearquarter(date)`, `yearquarter(timestamp)`, `yearquarter(datetime)`, `yearquarter(appointment)`

* `date` a date value
* `timestamp` a UTC-based timestamp value
* `datetime` a local datetime value
* `appointment` an appointment value; Ninox uses the start date for the `YYYY Qn` label

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#build-reporting-keys-with-yearmonth-yearweek-and-yearquarter).

***

### yearweek()

Return year-week like `2026 12`.\
`yearweek(date)`, `yearweek(timestamp)`, `yearweek(appointment)`

* `date` a date value
* `timestamp` a timestamp or datetime value
* `appointment` an appointment value; Ninox uses the start date for the `YYYY WW` label

Find more details [here](/ninox-scripting/automate-your-workflows/work-with-functions/dates-and-time.md#build-reporting-keys-with-yearmonth-yearweek-and-yearquarter).

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ninox.com/ninox-scripting/functions-and-script-library/functions-library.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
