- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2025 04:51 AM
Hi
I have a multi row variable se with one variable as yes/no type, it is hidden in portal and a widget script collects the data from portal,
in ritm form if the value is NO it should be highlighted in red, if yes then no change.
is it possible, any help
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2025 05:18 AM
yes it's possible.
Create catalog client script which Applies to MRVS variable set and Applies on RITM view
Then use this to color the label
but remember it will mark the color if someone opens that row of MRVS on RITM
Output:
Script:
Remember to give correct variable name and no value during comparison
function onLoad() {
//Type appropriate comment here, and begin script below
if (g_form.getValue('server_os') == 'test') {
g_form.getControl('server_os').setAttribute('style', 'color:red');
}
}
It won't highlight it on RITM form. Possibly it would require DOM manipulation which is not recommended
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
01-17-2025 04:57 AM
Hi @abjaffrey
I doubt it can be do able on variable, if it is the field we can try with field decorator.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2025 05:18 AM
yes it's possible.
Create catalog client script which Applies to MRVS variable set and Applies on RITM view
Then use this to color the label
but remember it will mark the color if someone opens that row of MRVS on RITM
Output:
Script:
Remember to give correct variable name and no value during comparison
function onLoad() {
//Type appropriate comment here, and begin script below
if (g_form.getValue('server_os') == 'test') {
g_form.getControl('server_os').setAttribute('style', 'color:red');
}
}
It won't highlight it on RITM form. Possibly it would require DOM manipulation which is not recommended
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
01-17-2025 05:30 AM
HI Ankur,
Thanks for the help, but the MRVS is read only. any way to chieve it on form view?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2025 06:01 AM
As mentioned you will have to use DOM manipulation and check each row in html
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