- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2025 03:27 AM - edited 05-02-2025 03:43 AM
Hello
I am working on The Case Form for CSM/FSM Configurable workspace.
On the Case table we have a related table called Task Skills (table)
I want to Task Skills to be added on the Case table Skills field which is a List type field
I tried updating the Dictionary and clicked Advanced view
Referencequal = javascript: 'active=true^skillsLIKE'+new x_sor_csmcase.CSMCaseUtils().getTaskSysID(current);
how to return the values in script include with comma separated values.
getBrandSysID: function(csmCase) {
var skills = '';
var gr = new GlideRecord('task_m2m_skill_list');
gr.addQuery('skill', csmCase.skills);
gr.query();
if (gr.next()) {
skills = gr.getValue('sys_id');
}
return skills;
},
I am not understanding how to achieve
Skills is field(present on Case table) for which i want to copy Task skills (related table) .
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2025 04:02 AM
use this in advanced reference qualifier
javascript: var arr = [];
var gr = new GlideRecord("task_m2m_skill"); // give your table name
gr.addQuery("task", current.sys_id); // give your task field name
gr.query();
while (gr.next()) {
arr.push(gr.skill.toString()); // give your skill field name
}
var query = 'sys_idIN' + arr.toString();
query;
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-02-2025 03:44 AM
use this in advanced reference qualifier
javascript: var arr = [];
var gr = new GlideRecord("task skills table"); // give your table name
gr.addQuery("task", current.sys_id); // give your task field name
gr.query();
while (gr.next()) {
arr.push(gr.skill.toString()); // give your skill field name
}
var query = 'sys_idIN' + arr.toString();
query;
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-02-2025 04:02 AM
use this in advanced reference qualifier
javascript: var arr = [];
var gr = new GlideRecord("task_m2m_skill"); // give your table name
gr.addQuery("task", current.sys_id); // give your task field name
gr.query();
while (gr.next()) {
arr.push(gr.skill.toString()); // give your skill field name
}
var query = 'sys_idIN' + arr.toString();
query;
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-07-2025 09:11 AM
Thank you for marking my response as helpful.
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-08-2025 03:38 AM
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