Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

How to add "Template" contextual side bar in outage table

Al-JhonV
Mega Sage

Hello everyone,

Template sidebar is available in Incident, change_request, or other task record but not in outage form.

I already tried to duplicate the Template SNC in UI Builder and remove the parent.table != cmdb_ci_outage from the condition:

AlJhonV_0-1789099029382.png



but still Template is not visible from the side bar menu.

1 ACCEPTED SOLUTION

musislam
Kilo Sage

Hi @Al-JhonV,

The variant copy won't do it. The gate isn't in UI Builder, it sits on the delivered screen record.

Where it lives: sys_ux_screen > Template SNC (Screen Collection: Templates, Page Definition: Template, scope: Service Operations Workspace Core).

Its Screen Condition field is:

controller.sowrecordctrl.inputs.inputTable!=sys_template^controller.sowrecordctrl.inputs.inputTable!=cmdb_ci_outage^controller.sowrecordctrl.inputs.inputTable!=sn_occ_custom_alert^controller.sowrecordctrl.inputs.inputTable!=sn_occ_log_viewer_search^controller.sowrecordctrl.inputs.inputTable!=em_alert^controller.sowrecordctrl.inputTable!=sysapproval_approver

cmdb_ci_outage is excluded right there. Delete that one clause, switch scope to Service Operations Workspace Core so you can save, then reload the outage record. The Templates icon appears in the contextual sidebar straight away, no cache flush and no re-login.

Duplicating the variant creates a second screen record and leaves the delivered one untouched, which is why the copy on its own changed nothing.

Second gate, easy to miss: that same screen has a child UX Screen Condition record with a scripted condition:

(function checkScreenVisibility(params) {
return gs.getProperty("glide.ui.show_template_bar." + params.table, true) == "true";
})(inputProperties);

So if glide.ui.show_template_bar.cmdb_ci_outage exists and is set to false, the panel stays hidden no matter what the screen condition says. It defaults to true when the property is not there.

Last step: the panel reads "No Templates Available" until you have sys_template records with Table = Outage. The Create button inside the workspace opens an empty form, so build the template in the platform instead:

please see the screenshot iamge  1-7 at the bottom from my PDI

Reload the outage record and it shows under My Templates with Apply working:

** SCREENSHOTS 8-10 **

One caution: this is a change to a delivered SOW Core record, so capture it in an update set and expect it on the skipped changes list at your next upgrade.

Verified end to end on an Australia PDI and the screenshot is below  at the end.

If that works for you, mind marking it as the recommended solution? Helps me support these better for the community.

Macki | Deloitte AU | Engineer LeadSOW4.jpgSOW3.jpgSOW2.jpgSOW1.jpgSOW8.jpgSOW7.pngSOW6.jpgSOW5.jpgsow10.jpg

Macki | Deloitte AU | Engineer Lead

View solution in original post

3 REPLIES 3

Dinesh Chilaka
Mega Sage

@Al-JhonV ,

Did you make the OOB Template SNC variant inactive?

If not make that page inactive and observe the changes now once.

If my response helped, mark it as helpful and accept the solution.

Thanks,

Dinesh

musislam
Kilo Sage

Hi @Al-JhonV,

The variant copy won't do it. The gate isn't in UI Builder, it sits on the delivered screen record.

Where it lives: sys_ux_screen > Template SNC (Screen Collection: Templates, Page Definition: Template, scope: Service Operations Workspace Core).

Its Screen Condition field is:

controller.sowrecordctrl.inputs.inputTable!=sys_template^controller.sowrecordctrl.inputs.inputTable!=cmdb_ci_outage^controller.sowrecordctrl.inputs.inputTable!=sn_occ_custom_alert^controller.sowrecordctrl.inputs.inputTable!=sn_occ_log_viewer_search^controller.sowrecordctrl.inputs.inputTable!=em_alert^controller.sowrecordctrl.inputTable!=sysapproval_approver

cmdb_ci_outage is excluded right there. Delete that one clause, switch scope to Service Operations Workspace Core so you can save, then reload the outage record. The Templates icon appears in the contextual sidebar straight away, no cache flush and no re-login.

Duplicating the variant creates a second screen record and leaves the delivered one untouched, which is why the copy on its own changed nothing.

Second gate, easy to miss: that same screen has a child UX Screen Condition record with a scripted condition:

(function checkScreenVisibility(params) {
return gs.getProperty("glide.ui.show_template_bar." + params.table, true) == "true";
})(inputProperties);

So if glide.ui.show_template_bar.cmdb_ci_outage exists and is set to false, the panel stays hidden no matter what the screen condition says. It defaults to true when the property is not there.

Last step: the panel reads "No Templates Available" until you have sys_template records with Table = Outage. The Create button inside the workspace opens an empty form, so build the template in the platform instead:

please see the screenshot iamge  1-7 at the bottom from my PDI

Reload the outage record and it shows under My Templates with Apply working:

** SCREENSHOTS 8-10 **

One caution: this is a change to a delivered SOW Core record, so capture it in an update set and expect it on the skipped changes list at your next upgrade.

Verified end to end on an Australia PDI and the screenshot is below  at the end.

If that works for you, mind marking it as the recommended solution? Helps me support these better for the community.

Macki | Deloitte AU | Engineer LeadSOW4.jpgSOW3.jpgSOW2.jpgSOW1.jpgSOW8.jpgSOW7.pngSOW6.jpgSOW5.jpgsow10.jpg

Macki | Deloitte AU | Engineer Lead

Hello @musislam this solved my inquiry...

I haven't noticed that there are 2 "Templates SNC" under Parent Screens tab.

I updated both record and Template contextual side-bar is now visible in cmdb_ci_outage table within SOW.

Thank you so much for the information!