Sign Up

Global Variables

To access the view of global variables, simply click on the globe icon located in the workspace toolbar within a class. Additionally, you can press CTRL + G to initiate the opening of the global variables view.

Global variables are variables declared at the global scope, providing accessibility from anywhere within your API, including classes, functions, events, and endpoints.

Given their broad accessibility, global variables can be utilized and modified across different classes, which may make them more challenging to manage and track. To maintain clarity and stability, it is advisable to adopt a pattern where global variables are treated as read-only, ensuring that their values remain consistent and are not subject to arbitrary changes. This approach helps mitigate potential issues stemming from unintended modifications to global variable values.

Related Topics

Validation Errors

Validation errors are similar to class errors but are performed at a lower level than the class. Any validation errors that arise will be displayed in the problems section of the bottom workspace bar. Clicking on the validation error will highlight the specific area where the problem occurs. If any ...

Testing

To ensure the proper functioning of your functions, it is essential to create tests that validate their output and ensure the reliability of your classes. To create tests, switch your class to test mode by clicking the "Tests" button in the bottom toolbar. This will display an alternate workspace de...

Variables

A variable encompasses various data types, including: Text: A string of characters Number: Ranging between -2147483648 and 2147483647 Boolean: Representing true or false Currency: Similar to Number but specific to prices Email: Similar to Text but designed for email addresses Date: A representation ...

Import Classes

In the current class, you have the option to import your own classes and utilize functions that were created earlier. This helps minimize the requirement for duplicate classes. Once a class is imported, you can access all of its functions by using the "Run function" statement.

Statements

In a function, various types of statements can be created to perform specific actions and control the flow of execution: Create Variable: Generates a new variable, which can be initialized from scratch, reference an existing variable or parameter, the result of a function, retrieve data from the dat...