NSOA.listview.list()
Use this function to read the list of published list views available from the OpenAir OData service. Returns the list of published list views.
-
Accessing published list views using the
NSOA.listview.data(listviewId)
andNSOA.listview.list()
user scripting functions does not use any of your allocated OData requests. -
For more information, see Business Intelligence Connector. See also NSOA.report.list() to read the list of published reports.
The Business Intelligence Connector feature must be enabled for your account to use NSOA.listview and NSOA.report functions. The Business Intelligence Connector feature is a licensed add-on. To enable this feature, contact your OpenAir account manager.
For more information about publishing list views and reports to the OpenAir OData service, see Business Intelligence Connector.
Parameters
N/A
Returns
-
The list of published list views. Each item in the list has the following properties:
-
ID
— The published list view OData resource ID -
Name
— The name of the list view -
Last published
— The date and time when the list view was last publishedImportant:The
Last published
property will beLast_published
with an underscore instead of the space if the optional feature Replace Non-Alphanumeric Characters with Underscores in Column Titles and Metadata is enabled for your account. Accommodate both possibilities in your scripts to ensure your scripts continue work whether the feature is enabled or not.
-
Units Limit
-
1 unit
Since
-
April 18, 2020
Example
// get the list of published listviews
var listviews = NSOA.listview.list();
// each item in the list has following properties
// * 'ID'
// * 'Name'
// * 'Last_published'
// loop through all published listviews and find given listview ID
var i;
var listviewId;
for (i = 0; i < listviews.length; i++) {
if (listviews[i].Name === 'My Approved Bookings') {
listviewId = listviews[i].ID;
break;
}
}
// if listview ID was found get its data
if (listviewId > 0) {
var rows = NSOA.listview.data(listviewId);
// process all listview rows
}