Get the values from RITM and set the values to sc task to control the sc_task form field values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2025 10:10 PM
Hi All,
I want to Get the values from RITM and set the values to sc task to control the sc_task form field values,
Below code is not working for me.
Note: Variable type is choice for both RITM and SC_task variables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2025 12:22 AM
Hi @Naga13 ,
based on the given sceneio try to run this script, it will works for you:
function onLoad() {
// Get the selected value for 'request_type'
var requestTypeValue = g_form.getValue('request_type');
g_form.setValue('request_type_task', requestTypeValue);
alert("Request Type: " + requestTypeValue);
// Get the selected value for 'v_application_type'
var appTypeValue = g_form.getValue('v_application_type');
g_form.setValue('application_type_task', appTypeValue);
alert("Application Type: " + appTypeValue);
}
Please Mark this Helpful and Accepted Solution. If this Helps you to understand. This will help both the community and me..
- Keep Learning
Thanks & Regards
Deepak Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2025 12:26 AM
sorry without screenshot can't help much.
onLoad is on table or catalog client script? share config screenshots
you are playing with fields or variables in your above script?
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