- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 07:28 AM
I have requirement where in transform map script(here Source table: staging table and target table : cmdb_ci) I have to check certain values(application_owner, application name) from sc_req_item table based on a match of 'alert id' and get values from sc_req_item table and update in target table(cmdb_ci).
I have written below code in Transform map script but I am not able to fetch values from sc_req_item table.The if loop (line 19) is getting executed i.e condition evaluates true, but I am not able to get value of 'Application_owner' , 'application_name'(line 20,21 not returning value). Please suggest how to achieve this.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 07:59 AM
Hi
if application_owner and application_name are variables on sc_req_item table then update below lines as.
application_owner = gr_req.variables.application_owner;
application_name= gr_req.variables.application_name;
Thanks & Regards,
Sharjeel
Muhammad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 08:04 AM
Try with logs.
gs.log(gr_req.variable_pool.application_owner);
gs.log(gr_req.variable_pool.application_name);
if(gr_req.next()){
application_owner = gr_req.variable_pool.application_owner;
application_name= gr_req.variable_pool.application_name;
}
target.application_owner= application_owner;
target.u_application_name = application_name;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 07:59 AM
Hi
if application_owner and application_name are variables on sc_req_item table then update below lines as.
application_owner = gr_req.variables.application_owner;
application_name= gr_req.variables.application_name;
Thanks & Regards,
Sharjeel
Muhammad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 08:02 AM
Thanks Muhammad, it worked.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 08:03 AM
Happy to help. Have a great weekend 🙂
Muhammad

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 08:09 AM
Please select appropriate response as correct as it is reference for others with the similar problem in the future.
Muhammad