- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2014 05:12 AM
You cannot use the field as choice list with an custom table.
I propose to you to create this field as reference to your custom table and as referece qual to have:
javascript:RccFilterBsUserImpact();
In our sandbox, in the incident you will found the user impact field.
Script Include
function RccFilterBsUserImpact(){
var bs = current.u_business_service.toString();
var cat = current.category.toString();
var resFilter = '';
if (bs && cat){
var m2m = new GlideRecord('u_m2m_user_impacts_services');
m2m.addQuery('u_cmdb_ci_service', bs);
m2m.addQuery('u_bs_user_impact.u_category', cat);
m2m.query();
while(m2m.next()){
// += concatenate all retreive information
resFilter += (m2m.u_bs_user_impact.sys_id + ',');
}
}
resFilter = 'sys_idIN' + resFilter;
return resFilter;
}