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

Jaspal Singh
Mega Patron
Mega Patron

Hi Leonardo,

 

Ideally it should work. I guess since its a database view that is created you will have to get ACL set up as well of type: read.

For admins it should work without ACL. Tested the same in my PDI & it works.

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

Unsure if comments from my end stated something else but it seems there is a definite need to use your method of '@' mention feature so as to get author's attention directly.

I'm actually a beginner in servicenow, I don't know what an ACL would be. I was able to consume more information from the other comment. But yours was also useful to me! Thnks