Reading OData Resource Data in Form and Scheduled Scripts in OpenAir
You can access your published report and list view data in your form and scheduled scripts using the following functions:
-
Read the list of published list views and reports available to the user running the script using
NSOA.listview.list()
andNSOA.report.list()
. -
Read the published list view or report data available to the user running the script using
NSOA.listview.data(listviewId)
andNSOA.report.data(reportId)
User scripting support for reading OData resource data has the following benefits:
-
The
NSOA.listview
andNSOA.report
functions give you access to the same information available when you use BI tools to access your OpenAir OData feed. -
Reading OData resource data using the
NSOA.listview
andNSOA.report
functions does not use any of your OData request entitlement — see OData Request Limits -
You can read data from all published reports in your user scripts. You can also publish reports exclusively for use in your user scripts. When using the
NSOA.report.list()
user scripting function to read the list of published reports, each item in the list has the propertyPublishType
— The scope of use specified for the published report. -
You can use published list views like custom queries and read the latest list view data in your form and scheduled scripts. The data read by your scripts is the same as the data you can see in your list view at any given time.
For more information, see the User Scripting.
Both form and scheduled scripts support the NSOA.listview.data(listviewId)
function. However, the number of items you can process in form scripts is restricted by their execution time limit. The function is best suited for reading published list view data in scheduled scripts, which allow up to 1 hour of JS runtime.
![Example of scheduled script using the NSOA.listview.list() function.](img/BIConnector/Scripting_NSOA_listview_functions.png)