Returns contextual information about the running app based on the keyword option specified.
Get started
Watch this video to get started using CONTEXT()
.
Sample usage
IN(CONTEXT("View"), LIST("Orders_Detail", "Orders_Form"))
returns a Yes/No
value that answers the question, is the currently-displayed view named Orders_Detail
or Orders_Form
? This might be used in a Show_If
column constraint
to display a column only in specific views but hide it elsewhere. See also: IN()
, LIST()
SWITCH(CONTEXT("Host"), "Device", "Tap below to:", "Browser", "Click below to:", "")
returns different directions depending on whether the app is running from the native app on a device or from a browser. This might be used to generate a display name for a gallery view of launchers. See also: SWITCH()
CONTEXT("VIEWTYPE")="Detail"
returns Yes
if the current view is of type Detail.
Syntax
CONTEXT( option
)
-
option- Must be set to one of the keywords described in the following table.
The following table lists the keywords and their return values.
Note : If an invalid option is provided, a null value is returned.
AppName
MyApp-123456
.Device
expression-assistant-device-id
is returned.Host
Returns one of the following values:
-
Serverwhen the expression is evaluated remotely on the server. Remote evaluation would include things like automation , security filters , or virtual columns computed during sync. -
Browserwhen the expression is evaluated locally within the app running in a web browser or the app preview in the editor -
Devicewhen the expression is evaluated locally within the Android or iOS AppSheet apps or branded apps .
Local evaluation would include things like column constraints , slice filters , and virtual columns updated during editing.
OwnerEmail
Table
Name of the table used by the current view.
View
ViewType
Notes
The View
and ViewType
options are:
- Not supported for Chat apps or embedded app view emails (dynamic emails).
- May not work as expected if used in a virtual column's App formula expression . Except when editing a row (for example, in a form or with an action) and other limited circumstances, virtual column values are computed by the AppSheet server during a sync .
In each case, the server is unaware of the view currently visible to the user, so cannot provide the view name or type.

