find RITM in Request Table

Jaeik Lee
Mega Sage

Hi.

I'm making My request Filter, and One problem occured.

When Using filter, I must use Request Table. but target column is inside of RITM.

Can i find that column?

Thank you for your answer.

 

6 REPLIES 6

 Thank you for help. I working in My Request Filter module. I looking for way to dot-walking in that module. 

filter.PNG

Jaeik,

The issue is relationships.  A Request (sc_request) can be related to multiple Request Items (sc_req_item), so if you have a REQ (Request) with 6 RITMs (Request Items) under it and you want the number field...what is it supposed to show you?  There is no relationship in that direction for you to dotwalk.  If you want to get RITMs associated to a REQ you need a query.

 

var grRITM = new GlideRecord("sc_req_item");
var reqSys = "";//sys_id of the Request record.
grRITM.addEncodedQuery("request=" + reqSys);
grRITM.query();
while (grRITM.next()) {//loop through all the RITMs under the REQ
    gs.info('number: ' + grRITM.getValue('number'));//Print the RITM Number
   }