WA Get context
WA Get context* ( {* ;} object ) -> contextObj
| Parameter | Type | Description | |
|---|---|---|---|
| * | Operator | → | If specified, object is an object name (string). If omitted, object is a variable. | 
| object | any | → | Object name (if * is specified) or Variable (if * is omitted). | 
| contextObj | Object | ← | Context object if previously defined, otherwise null. | 
Description
The WA Get context command retrieves the context object defined for $4d in the Web area designated by the * and object parameters using WA SET CONTEXT. If WA SET CONTEXT was not called for the web area the command returns null.
note
The command is only usable with an embedded web area where the Use embedded web rendering engine and Access 4D methods parameters are set to true.
Example
Checking if a context exists:
 var $contextObj:=WA Get context(*; "myWebArea")
 If ($contextObj=Null)
	ALERT("No context set for this web area.")
 Else 
	ALERT("Context is defined!")
 End if
See also
Properties
| Command number | 1849 | 
| Thread safe | ✗ |