Adding a VTB to a dashboard

Jerry20
Tera Contributor

Is there a way for a user to add an VTB ( visual task boards) to a dashboard?   I tried testing this with an IFrame but that did not display nicely.   I do not want to configure a CMS page with an IFrame or even get into using CMS.   Ideally I would like to be able have the user add his VTB to his own dashboard.   Any suggestions?

 

Jerry

4 REPLIES 4

Laxmikanth
Tera Expert

Hi Jerry,



You will find this thread useful



Re: Display Agile Task Planning Board on Homepage or Dashboard


Aditya Telideva
ServiceNow Employee
ServiceNow Employee

1. Go to System UI > UI Page > New


Name: vtb_page


XML:




  1. <?xml version="1.0" encoding="utf-8" ?>  
  2. <j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">  
  3. <iframe src="$vtb.do" style="width: 100%; height: 700px;"/>  
  4. </j:jelly>  

2. Go to System UI > Widgets > NewName: Visual task Board WidgetScript:


  1. function sections() {  
  2.       return {  
  3.               'Visual Task Boards': {  
  4.                       'type': 'vtb_page'  
  5.               }  
  6.       };  
  7. }  
  8.  
  9.  
  10. function render() {  
  11.       var scope = gs.getCurrentScopeName();  
  12.       scope = (scope == 'rhino.global' ? '' : scope + '_');  
  13.       var page = renderer.getPreference('type');  
  14.       return renderer.getRenderedPage(scope + page);  
  15. }  
  16.  
  17.  
  18. function getEditLink() {  
  19.       var scope = gs.getCurrentScopeName();  
  20.       scope = (scope == 'rhino.global' ? '' : scope + '_');  
  21.       var page = renderer.getPreference('type');  
  22.       return "sys_ui_page.do?sysparm_query=name=" + scope + page;  
  23. }  


3. Go to any homepage > Add content


4. Search for 'Visual Task boards' then add it to homepage.



Useful documentation for creating and configuring widget script:


Create a widget that displays a ServiceNow UI page


Thank you! this worked perfect on my dashboard.

Hi Aditya,

This works great. One question. Can it be made so that the user can choose which VTB it loads up automaticly?

Thanks

Flemming