How to Add Databaseview to list on Service Operations Workspace

Vani12
Tera Contributor

Looking to find an option to add Database view to Service Operations Workspace. 

If anyone has any thoughts, it is much appreciated.

1 ACCEPTED SOLUTION

Danish Bhairag2
Tera Sage
Tera Sage

Hi @Vani12 ,

 

Could plz take a look at this article. Hope it helps:

https://www.servicenow.com/community/app-engine-forum/using-a-database-view-in-a-simple-list-in-ui-b...

 

Please mark my answer helpful & accepted if it resolves your query.

 

Thanks,

Danish

View solution in original post

5 REPLIES 5

Danish Bhairag2
Tera Sage
Tera Sage

Hi @Vani12 ,

 

Could plz take a look at this article. Hope it helps:

https://www.servicenow.com/community/app-engine-forum/using-a-database-view-in-a-simple-list-in-ui-b...

 

Please mark my answer helpful & accepted if it resolves your query.

 

Thanks,

Danish

Thanks Bhairag for the quick response.

 

I had a look at the provided thread, but that shows how we can add it to the list widget on the Homepage of Workspace. But not exactly the list

Vani12_0-1695290671846.png

 

Revanth Karra
Tera Expert

Dear Vani,

 

Hope you're doing great!

 

@Vani12 , There is no direct way to add a database view to Service Operations Workspace. However, there are a few methods that you can use.

 

Method 1:

Use a list collector to display the database view. To do this, follow these steps:

  1. Create a list collector and select the database view that you want to display.
  2. Add the list collector to a form in SOW.
  3. Open the form in SOW and the database view will be displayed.

Method 2:

Use a custom HTML widget to display the database view. To do this, follow these steps:

  1. Create a custom HTML widget and add the following code to the HTML field:

 

 

<script>
  // Get the database view record.
  var databaseViewRecord = GlideRecord('sys_db_view');
  databaseViewRecord.get('name', 'database_view_name');

  // Get the database view data.
  var databaseViewData = databaseViewRecord.getValue('data');

  // Display the database view data.
  document.write(databaseViewData);
</script>

 

 

      2. Replace database_view_name with the name of the database view that you want to display.

      3. Add the custom HTML widget to a form in SOW.

      4. Open the form in SOW and the database view will be displayed.

 

NOTE:

Finally, @Vani12  you can also use a third-party plugin to display database views in SOW. There are a few different third-party plugins available, so you can choose one that meets your needs.

 

Kindly, please mark my solution as Helpful/Correct, if applicable. If I could help you with your Query then, please hit the Thumb Icon and mark as Correct!!!

 

Thanks & Regards, 

Revanth. K

Product Test Automation Engineer

Thanks @Revanth, really appreciate your suggestion.

I tried adding it to the homepage for the moment. As ServiceNow also confirmed that there isn't any OOB option for adding DB view as list module as of today.