- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2025 08:14 AM
Hi everyone,
I'm trying to implement the following logic in the Service Operations Workspace (SOW) form:
Whenever the field "On hold reason" (a choice field) changes — before the record is saved — I want to copy the label (not the value) of the selected choice into the "Short description" field.
I've already implemented this successfully using a Client Script on the standard form, but it doesn't work in the Configurable Workspace (SOW).
Is there a way to achieve this using Client View Rules, Data Broker, UI Component configurations, or any other recommended approach in SOW?
Any guidance or examples would be greatly appreciated.
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2025 05:00 AM
that method won't work in workspace as it's not supported. see below
This is the workaround
Ensure Global Checkbox is checked in onChange client script so that it works in both native + sow
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
// add your choice values and choice labels in json object
var reasonLabels = {
'1': 'Awaiting Caller',
'2': 'Awaiting Evidence',
'3': 'Awaiting Problem Resolution',
'4': 'Awaiting Vendor'
};
var value = g_form.getValue('hold_reason');
var label = reasonLabels[value] || value;
g_form.setValue('short_description', label);
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2025 05:14 AM
Glad to help.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader