How do I add a widget to a catalog variable

timhorn
Kilo Expert

We have several complex forms that include multiple UI Pages.   We just upgraded to Istanbul and we're looking to convert

our CMS portal to the Service Portal.   I've seen lots of posts about how UI Pages and UI Macros will have to be replaced with

variables that contain widgets.   Many of those posts show what the variable form should look like, with the "widget" field

showing up in the "default value" section.   No matter what I do, I can't get the widget field to show up.   I modified the form

layout to include it.   I tried using every type of variable.   It just won't show up.   Is there some trick to this?   I have to be

missing something obvious.

1 ACCEPTED SOLUTION

ChrisBurks
Mega Sage

The steps to adding a widget to a catalog item are as follows:



1. Create Service Portal widget


2. Navigate to desired Catalog Item to configure


3. Under the Variables section click New


4. Widgets can only be added to variable type "Macro". Therefore select "Macro" as the type


5. Click on the "Default Value" tab


6. In the Widget field select the widget created in step one


7. Select the Question tab


8. Fill in the required fields such as Question and Name.


9. Submit.


Now the widget should appear within the catalog item when rendered via Service Portal.



Here's a quick video to demonstrate:


addwidget


View solution in original post

16 REPLIES 16

Chris, 

We have a scoped service management app. We've created a new catalog item.  Now we're trying to add a widget to the new catalog item, but the widget field is not present on the type specification tab when selecting macro as the variable type.  Is this yet another thing we can't do because it's a scoped app? 😞

Thanks!

Adding a widget as a Catalog Item variable is supported in scoped apps. 

A couple of things I would check:

  • Which version is your instance? Kingston and earlier the Widget field is under the Default tab
  • If you're on London the Widget is under the Type Specification field. If not present then see if the field has been added to the form: Right click header -> Configure -> Form Layout (or Form Design) 

Use the type Custom in this option you can use the widget.

Screenshot 2023-05-26 at 8.48.09 a.m..png

Hi @ChrisBurks 

 

I could not see catalog variable type is macro, i  could see ui page , please help me how to add macro to catalog item

Hi @anitha0887 ,

The Variable Type is called "Custom".

After selecting this type, click on the Type Specification tab. It will reveal new fields one of which is labeled "Macro".

catalog_variable.png

 

Edit:

I forgot to mention that through the years ServiceNow has changed since the original answer was accepted. The type used to be named "Macro" but since the implementation of Service Portal and having the capability to add different types of components like widgets, macros, and macroponents the type was changed to Custom.