Database Views and Script Includes in Workspace/UIBuilder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2022 09:52 AM
My team and I are attempting to use UIBuilder to pull in some data that we have already identified/joined with a database view. We have found that you cannot reference DB Views in lists or the data components. Is there a better, even at all, way to try and use our DB views in the Workspace?
On a similar note we found that some of our predefined script includes, that we've used elsewhere, dont seem to be usable by default by any components - is there a way to call them without using GlideAjax?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2022 01:19 PM
Hi Cooper,
The short of it is UIB has a different data paradigm than other parts of the platform so you're probably better off long-term embracing that, but I know you probably want to take advantage of your existing resources rather than having to rebuild them.
In general in UIB you interact with data in a couple of different ways. Some components fetch data from ServiceNow's DB on their own, like the list components, but most just have properties you can bind data to. The primary way to interact with data is through data resources. There are different types, including GraphQL, which can query multiple tables like what you're doing with DB Views, and there are also transform data resources which let you run server-side JS and call things like script includes or query db views.
- UI Builder - Data Resources
- UI Builder Course - Developer Site
- Now Experience UI Builder Fundamentals
I know that was a lot to throw in there, but take a look at the first two links and let me know what questions you have.