- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2018 01:27 PM
We are working with the new Order Guide in Kingston and we have about 22 Items we want to include in the Order Guide that we are creating. I cannot find a place to have all the 22 catalog items that show up on the Choose Option page to have the toggle switch default to Off instead of On. Anyone have any ideas on how to toggle them all Off when the screen loads so the person filling out the form has to check them all? See screenshot below - I marked the toggle switch I'm talking about with a red box
Solved! Go to Solution.
- Labels:
-
Service Catalog
-
Service Portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2018 05:15 PM
I decided to give this a go with editing the widget and found it really wasn't too bad to do it. You'll still have to own the cloned version of the widget, but the original will still upgrade for you to merge with after an upgrade. Here's how you can accomplish this...
1) Create a new field True/False field on the 'sc_cat_item_guide_items' table (this is the table in the Order Guide rule base related list). Make sure to name the field 'Toggle off default' and then you can re-label however you want. We just want the field name to match what I've got in the script below. You can then check this field if you'd like the toggle to be off for a particular rule base option by default.
2) Clone the 'SC Order Guide' widget and modify the 'Server Script' portion of the widget to include the following code immediately after the 'item.included = true;' line.
// Query for the order guide rule base for this item to determine if it should be on or off by default
var ogr = new GlideRecord('sc_cat_item_guide_items');
ogr.addQuery('guide', $sp.getParameter("sys_id"));
ogr.addQuery('item', item.sys_id);
ogr.query();
if (ogr.next()) {
if (ogr.u_toggle_off_default == true) {
item.included = false;
}
}
3) Replace the 'SC Order Guide' widget with your new widget on the 'Order Guide' page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2018 10:55 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2019 09:06 AM
Does anyone know if this is STILL the only answer for this? I'm in London and essentially desiring an OOTB solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2020 12:10 AM
Nothing in Orlando or New York, still have to customise.
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022