- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 11:23 PM
Hi All,
I have a table called 'Allegation Outcomes' in which there is a dot walked field called Allegation type.
An onchange client script needs to be configured on this field and on change of this field options have to be added and removed in the outcome field.
Issue: unable to configure the onchange 'Field name' for dot walked field.
Can anybody suggest an alternative or any other solution to achieve the results?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 12:19 AM
it won't work that way for dot walked field.
Why are you allowing to change the Allegation type dot walked field on your current form?
If it has to be updated then it should be updated in the actual record and not on the form where it's shown as dot walked field
For your requirement you can use onLoad client script to check the value and then hide
function onLoad() {
if (g_form.getValue('allegation.allegation_type') == 'your value') {
g_form.removeOption('outcome', 'choice value');
}
}
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
05-14-2025 12:19 AM
it won't work that way for dot walked field.
Why are you allowing to change the Allegation type dot walked field on your current form?
If it has to be updated then it should be updated in the actual record and not on the form where it's shown as dot walked field
For your requirement you can use onLoad client script to check the value and then hide
function onLoad() {
if (g_form.getValue('allegation.allegation_type') == 'your value') {
g_form.removeOption('outcome', 'choice value');
}
}
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
05-14-2025 12:33 AM
Hi @Ankur Bawiskar ,
The Outcomes field is on Associated allegations table and the Outcomes value should be associated with each of the Allegation Type and that is the reason i am doing the checks on the 'Associated allegations' table.
And the requirement is after change in the 'Allegation type' the 'Outcome' value option needs to be changed accordingly and i think Onload Client script will not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 12:59 AM
it won't work as I already said above.
Also not a good practice to allow changing the Dot walked field on form.
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