Skip to main content

The Retool Context object

Information about the current web app.

Properties

All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.

appName

The name and path of the app.

Type string
Format Plain Text
Mutability Read-only
Examples
"/path/to/app"

appUuid

The unique ID of the app.

Type string
Format Plain Text
Mutability Read-only
Examples
"12345678-1234-1234-1234-123456789012"

currentPage

The currently selected page.

Type string
Format Plain Text
Mutability Read-only
Examples
"page1"

environment

The selected environment.

Type string
Format Plain Text
Mutability Read-only
Examples
"production"

inEditorMode

Whether the app is open in the App IDE.

Type boolean
Format True/False
Mutability Read-only
Examples
true

pages

A list of app pages.

Type array
Array values object
Mutability Read-only
Array Object Properties

id

The unique identifier (name).

Type string
Format Plain Text
Mutability
ControlUsage
Retool UI Inspector
Default
{placeholder}1
Examples
query1
button1

title

The title of the page.

Type string
Format Plain Text
Mutability
ControlUsage
Retool UI Inspector > Content > Browser title
Examples
Page 1

url

The URL path of the page.

Type string
Format URL
Mutability
ControlUsage
Retool UI Inspector > Content > Custom URL
MethodopenUrl()
Examples
page1

isCurrentPage

Whether the page is the current page.

Type boolean
Format True/False
Mutability Read-only
Examples
true


pageTag

The release version of the app. Defaults to latest if using the working version.

Type string
Format Plain Text
Mutability Read-only
Examples
latest
v1.0.0

runningQueries

A list of queries running.

Type array
Format Plain Text
Array values string
Mutability Read-only
Default
[]
Examples
["query1", "query2"]

translations

A list of translated text for localization.

Type object
Mutability Read-only