How to use a Database View in a Reference Variable in the Catalog Item?

Leonardo Ferrar
Kilo Expert

I created a database view and I want to use it in a reference type variable within my catalog item. However, when I test the variable it does not list anything.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Leonardo Ferrari 

Are you saying you want to create a variable of type reference on catalog which refers the database view table?

You can achieve this by selecting the reference table as the database view table.

Just ensure you have the proper READ ACL on that database view table

Create a read ACL directly on the database view table to allow non-admin users to view database view records:
  1. Type Access Control in the navigation filter. 
  2. Select the Access Control (ACL) module.
  3. Select the New action at the top of the list.
  4. Under Operation, select Read, and under Name, select the name of the database view i.e. Incident SLA
  5. Add the required roles needed to access the database view and click Submit.  

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

5 REPLIES 5

tania02
Kilo Contributor

Creating a read ACL did not work for me, the records in the variable field are displaying a list of records but those do not have any label and on randomly selecting a record, the sys_id gets displayed in the field. I need to show the user name from user table in my case. I have created a database view of sys_user table to display a list of inactive users. Please let me know if I am missing on any step