- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2025 07:01 AM
Issue is, when i am selecting technical service in "Service" field of Change form then after submitting the Change record the "Service offering" field getting mandatory automatically as per my expectations.
further to this when i am changing Service in "Service" field as Non Technical or Business service and then againing clicking update the change record then it's not allowing me since Service offering is mandatory,
I am try Dot walk UI Policy.
so, can we have a solution for this where Service offering gets optional once we select no Technical or Business service?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-13-2025 06:56 AM
Define a client script for the incident table, as you have for the change_request table. The same Script Include can be used by any number of client scripts. You can copy the client script and just change the table from 'change_request' to 'incident'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2025 10:27 AM
The logic in the Client script "toggles" the "Service Offering" being mandatory or not when the "Service" value changes. First screenshot shows a "Service" selection that is not from either Class. The second screenshot shows when a "Service" selection is from either Class.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2025 11:20 AM
@Bert_c1 I used your client script + Script include + my UI Policy to fulfil the requirement to work.
Only client script + script include is not fulfilling the requirement,
can we do it , please suggest?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2025 01:53 PM - edited ‎06-11-2025 01:55 PM
In the client script, please remove the check for 'newValue === '' in the first if statement and use:
if (isLoading) {
return;
}
// check for blank value
if (newValue === '') {
g_form.setMandatory('service_offering', false);
}
so when the value is cleared, the Service Offering is not mandatory. If you're still having problems. Post screenshots of the client script and script include. Both have been tested in my instance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2025 02:14 PM - edited ‎06-11-2025 02:24 PM
I tried Client Script & Script Include without UI Policy After submitting a Change Request Service Offering field gets optional (with filled value ) for Service (Business or Technical Service)
Do you want me to enable UI Policy Dot walk filter as well? with Client script + Script include?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2025 02:33 PM - edited ‎06-11-2025 02:35 PM
No, the UI Policy didn't work for you, I don't have that in my instance. Just the client script and script include.
Now you use " Service (Business or Technical Service)" for your two Classes where Service Offering is mandatory. What I have in the Script Include are what I believe you're referring to. I determine this by view tables extended from the Service (cmdb_ci_service) table And I see the following:
So I have 'cmdb_ci_service_business' and 'cmdb_ci_service_technical' as the two desired services. and I see those 5 classes when I look at a list of records in the cmdb_ci_service table. I don't know what you have in your instance. Please review that.