Service Portal : Data is not populated when calling data table widget in another widget

raja_5
Tera Expert

Hi Experts,

 

I am trying to call the 'ABC' data table widget in "XYZ"widget when clicking on a tab in 'XYZ' widget 

Widget "ABC" preview attached : data table widget  (Expected looks and feel)

but when calling 'ABC' in 'XYZ' it doesn't show me the data

 

Current look feel: screenshot attached no data.PNG

 

Widget XYZ details below

HTML :

<sp-widget widget="c.data.example"></sp-widget>

 

 

Server script :

(function() 
{
    data.tabList = [
{name : gs.getMessage('Roles and Permission'), tab_id: 'RolesandPermission'}];
    data.example = $sp.getWidget('ABC', {});
    })();

NOTE: followed steps from below URL,
 
 
Though it shows me the complete data, But when I add filter condition it doesn't apply on the data shown
 
Kindly suggest.
 
Thank you!
1 ACCEPTED SOLUTION

Hi @raja_5 1]  Can you try to pass existing data-table widget in below line.
data.example = $sp.getWidget('widget-data-table', data);

 

2] Also add data.enable_filter = true;  line above the 'data.filter=options.filter;' line.

Could you please share your widget snippet, In my case it is look likes this

Sonu_Parab_0-1678294807213.png

 

 

are the records are displays on widget the only issue is that Breadcrumbs right?

View solution in original post

16 REPLIES 16

Sure

okay, As you said records are filter and you can also apply the filter. then what is the issue you are facing related to the breadcrumbs?
Do you need to set default breadcrumbs as below:

Sonu_Parab_0-1678295472288.png

 

@Sonu Parab 

is there way to remove the highlighted buttons in the screenshot attached?

rajashekhar1_0-1678296234055.png

 

@raja_5  ,

Have a look this post,https://www.servicenow.com/community/developer-forum/data-table-widget-hide-filter/m-p/1782338/page/...

to hide these buttons , need to play with css 

 

@Sonu Parab 

 

Can we limit the columns in list ,example : i would want only User,role and created ?