Onchange and onload client script for variable editor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2025 04:26 AM
Hi ,
I need to fetch a value from variable editor variable based on that variable i need to update the assignment group onchange and onload.
g_form.getValue('variables.division');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2025 04:45 AM
Hi,
Please explain your question in a bit more detail to make it understandable.
Also screenshots would help understand what you need help with.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2025 04:47 AM
Hi @Arun_Manoj ,
you can check the
Applies on Target Record check box if it's record producer generated record
check the Applies on catalog task if it's on catalog task
check the Applies on requested item if it's on the RITM
and you get the variable by g_form.getValue('your_variable_name')
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2025 04:53 AM
what's your business requirement? share screenshots.
if you are writing normal client script on your table's field then this is the syntax to grab the variable value
g_form.getValue('variables.division');
If you are writing catalog client script then syntax is this
g_form.getValue('division');
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
a month ago
Hope you are doing good.
Did my reply answer your question?
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