- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2022 11:25 PM
I created a Factor Type field in the Problem table.
Factor Type
Table : problem
Type : String
Column name : u_factor_type
Choice value
- internal_factor
- external_factor
- other
I want to see the fields below to auto-set the Factor Type field choices
Damage
Table : cmdb_ci_outage
Type : String
Column name : u_damage
Choice value
- having
- nothing
- other
Is there a way to get the information of the Incident record
from the related list of the Problem record and then the fields of the Outage record?
Thank you
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2022 11:48 PM
Hi,
This is how you can get the outage related with problem.
var incGr = new GlideRecord('incident');
incGr.addQuery('problem_id',current.getUniqueValue());
incGr.query();
while(incGr.next()){
var outageGr = new GlideRecord('cmdb_ci_outage');
outageGr.addQuery('task_number',incGr.getUniqueValue());
outageGr.query();
while(outageGr.next()){
gs.info('Damange :'+outageGr.u_damage);
}
}
Here current refers to the problem record.
Thanks,
Anil Lande
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2022 11:32 PM
Hi,
What is problem have multiple incidents and incidents have multiple outage records?
Thanks,
Anil Lande
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2022 11:37 PM
Where you want to access it? in client side script or server side script?
How you want to use it on problem?
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2022 11:42 PM
Hi.
I'm sorry it's hard to understand.
In other words, I would like to know how to get the Outage record from the Problem table.
Currently, the Problem table and Outage table are linked only to the related list.
How to open from Problem to Outage.
Problem Related list : Incident tab > Incident Related list : Outages tab > Outage record
Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2022 11:48 PM
Hi,
This is how you can get the outage related with problem.
var incGr = new GlideRecord('incident');
incGr.addQuery('problem_id',current.getUniqueValue());
incGr.query();
while(incGr.next()){
var outageGr = new GlideRecord('cmdb_ci_outage');
outageGr.addQuery('task_number',incGr.getUniqueValue());
outageGr.query();
while(outageGr.next()){
gs.info('Damange :'+outageGr.u_damage);
}
}
Here current refers to the problem record.
Thanks,
Anil Lande
Thanks
Anil Lande