Context¶
When the script is running in the cloud, the context object provides a context environment. Here's how to use it.
Function import required
To use these functions, the context module must be imported.
server_url¶
server_url
Server URL, used to initialize Base.
Example
api_token¶
api_token
API token to access a base.
Example
current_table¶
current_table
The name of the table that the current user is viewing when the script is run.
Example
current_row¶
current_row
The line which triggered the script run:
- the line where the cursor is currently located (if the script is run manually)
- the line from which the button to launch the script was clicked (if the script is run from a button-type column click)
- each line triggering the automation (if the script is run by an automation rule)
Example
current_username¶
current_username
The system ID of the user who runs the script manually (it was previously called current_user_id). It is a unique identifier ending by @auth.local.
Example
current_id_in_org¶
current_id_in_org
The id of the user in the team, it can be set by the team admin via the web interface.
Example
get_setting_by_key
Get a context setting by its key. This provides access to additional context data beyond the predefined properties above.
Output The value of the setting, or None if not found
Example