- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2024 11:54 PM
I am having a reference field on the Service catalog form,
below is the screenshot
and level 3 form field is like below.
and coming to script include, through the Reference qual.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2024 12:04 AM
Hi @pavam
Correct the Typo in the Script Include:
There’s a typo in chocies. It should be choices.
return 'sys_idIN' + choices;
can you revisit the script and modify it
businessGroup: function() {
var choices = [];
var gr = new GlideAggregate('u_ehs');
gr.groupBy('u_business_group');
gr.query();
while (gr.next()) {
gs.log("level 3 in SI in loop: " + gr.getValue('u_business_group'));
choices.push(gr.getValue('u_business_group').toString());
}
return 'u_business_groupIN' + choices.join(',');
},
If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!
Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI
YouTube: https://www.youtube.com/@learnservicenowwithravi
LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2024 12:04 AM
Hi @pavam
Correct the Typo in the Script Include:
There’s a typo in chocies. It should be choices.
return 'sys_idIN' + choices;
can you revisit the script and modify it
businessGroup: function() {
var choices = [];
var gr = new GlideAggregate('u_ehs');
gr.groupBy('u_business_group');
gr.query();
while (gr.next()) {
gs.log("level 3 in SI in loop: " + gr.getValue('u_business_group'));
choices.push(gr.getValue('u_business_group').toString());
}
return 'u_business_groupIN' + choices.join(',');
},
If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!
Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI
YouTube: https://www.youtube.com/@learnservicenowwithravi
LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/