- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
The app runtime provides the following suite of objects - always accessible to your scripts. Collectively, they are referred to as a graph.
Documentation describing each object's properties and functions is also provided.
Name | Description |
---|---|
debug | Access debugging features useful during testing |
runtime | Access to runtime information |
tools | Access to a collection of general purpose tools |
script | Access input parameters to your script (when applicable) |
user | Access user interactions such as alerts and input validation |
app | Access your app and its objects directly |
teams | Access your organization's Teams communications |
avatar | Access connected avatar (person, place, or thing) |
ai | Access intelligence features (i.e. insights, models, etc) |
iot | Access measurements captured from the Internet of Things (IoT) (i.e. medical devices) |
cache | Access a cache resource throughout the entire app lifecycle |
network | Access external Internet resources |
Using Graph Objects
To demonstrate how scripting objects are used, below is an example app script that gets the user's first name from an app object (named 'firstName' in your app) and then displays a personalized welcome message (i.e. 'Hello, Jane!').
This task is easily accomplished using the app and user objects in just two lines of code!
// read the user's first name
var name = app.get('[firstName]');
// display a personalized welcome message
user.alert('Hello, ' + name + '!');
Note: Scripting objects are always accessible within your scripts.