How to get catalog variables under related list in ServiceNow ?

Snehal13
Kilo Sage

Any idea on how to get the variables under the RL ?

I submit catalog form for say product 'Apple v1.2' with catalog variables as build number=132 and requested location as Onsite. (There is a field to choose 'product' on the catalog)

Now, when I check the product list view and open the product page for Apple v1.2, I must see the related list with record as build number=132 and Requested location as Onsite. 

If I submitted the catalog for this product 3 times, I must see 3 records under the related list, each record under the list having columns as build, location 

Stuck at the script level in relationship script to map the product name with the variable field holding the product and then get the phase and build variables under the RL

7 REPLIES 7

Uncle Rob
Kilo Patron

I have a video that describes this.  If you want to go straight to the section that has the answer, use this time stamp.

Hello Robert,

UPDATE - I am now able to setup relationship between the product and the catalog product choice under related list to show the RITM raised for the product. If catalog was submitted for that product 5 times, I show  RITMs under the RL for that product. Not the exact solution but atleast it is clear as to what RITMs are raised for that product (and go ahead to check the variables)

However, the gear icon for the RL does not show Variables hierarchy to pull the specific variables onto the related list. This is something undocumented and bit of an open issue yet..

Snehal13
Kilo Sage

Thanks Robert for your response.

Apologies If I misinterpreted your video flow. - I have checked the video and it seems that the variables are fetched under a report while my req is to get them under a RL through the relationship script on the logic that number of times a catalog is submitted for a product, the RL must show that many records on that respective product.

In my relationship script, I have - current.addQuery(current.<product fieldname>, parent.variables.<product field name>);

Parent table is sc_req_item and current is product table.

I get all records from RITM table irrespective of that product. The gear icon to choose columns does not include variable hierarchy..

 

Is there a field called variables when you're configuring the related list on that form?