Functions to lookup system values or list aliases
Functions
info(name) → {string}
The info() function will return current system information Possible name values:
Name | Examples | Description |
---|---|---|
username | 'john.smith' | The currently logged in user |
organisation | 'Global GBM' | The organisation name |
environment | 'Test Environment' | The environment name |
project | 'Roads Test' | The project name |
dataset | 'Roads' | The dataset name |
variant | 'Inspector' | The variant name if one is being used |
query | 'Brisbane Roads' | The query name if one is being used |
Parameters:
Name | Type | Description |
---|---|---|
name |
string |
Required. The name of the setting to return |
Returns:
- Type:
- string
The specified setting
lookup(value, type, field)
The lookup() function looks up details about list items
Parameters:
Name | Type | Description |
---|---|---|
value |
string |
Required. The value to look for in the specified list |
type |
string |
Required. The type of detail to look up. The only possible type at the moment is 'alias' |
field |
string |
Required. The field id that the list is applied to |
offline() → {boolean}
The offline() function returns if the current project is marked as offline
Returns:
- Type:
- boolean
The currently logged in user
username() → {string}
The username() function returns the currently logged in user and is shorthand for info('username')
Returns:
- Type:
- string
The currently logged in user