Service Portal : Hide Toggle Bar on Choose Options in Order Guides
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2022 11:28 PM
Hello team,
We need to hide the below toggle bar for specific Order Guides in Service Portal
Please find below the html line of codes for this toggle bar
<html>
<head></head>
<body>
<div class="inline" ng-if="::showIncludeToggle">
<div class="input-switch inline v-middle m-l" ng-click="$event.stopPropagation()" uib-tooltip="{{item.included ? '${Included}' : '${Not Included}'}}" tooltip-placement="top" tooltip-append-to-body="true" role="none">
<input type="checkbox" ng-model="item.included" tabindex="0" aria-label="${Included}" id="enable_switch_{{::item.sys_id}}">
<label class="switch" for="enable_switch_{{::item.sys_id}}" ng-click="toggleItemState(item)"></label>
</div>
</div>
</body>
</html>
I have already tried ng-hide="item.order_guide" but it didn't work
Please let me know any possible solutions.
Thanks & Regards
Shailendra
cc
- Labels:
-
Multiple Versions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2022 11:42 PM
as you can see, this element is shown depending on the variable "showIncludeToggle" being true.
Check in the client/server code of your widget how this variable is being set. Perhaps there is an option you can set, or otherwise in the server script, you could set this var to false, based e.g. on the sys_ids of the specific Order Guides or whatever condition you'd like to have.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2022 11:48 PM
HI
All you have to do is to set the value to "False" in server script of the widget.
item.included = true;
This will enable the items to "NOT INCLUDE" by default.
From this thread :https://community.servicenow.com/community?id=community_question&sys_id=4f5b4adbdb41a300feb1a851ca96...
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep