Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to add multiple widgets in single widget?

Prabhakar9
Tera Contributor

Hi Team,

I am not able to add multiple widgets in a single widget while creating the dashboard. Could you please help me out.

Thanks & Regards,

Prabhakar

15 REPLIES 15

Sorry for delay responding. Its not cleared, which I have asked the question

Thanks for your support.

palanikumar
Giga Sage
Giga Sage

Hi,

To add a widget with a widget you have to follow the below steps:

In Service Script add the following code:

data.widget1 = $sp.getWidget("widget1"); // widget1 should be a valid Widget Name used in ID field of Widget

 

In HTML Template add the following code to insert the Widget:

<sp-widget widget="data.widget1"></sp-widget>

 

This way you can add multiple Widget.

 

Thank you,

Palani

Thank you,
Palani

I will try. Thank you so much Palani.

I don't have knowledge in service portal Developer. I am a system administrator in ServiceNow.

hi @palanikumar can we use css also when we call other widgets