Getting the value of Catalog from Approval table

n20
Kilo Explorer

Hi All

For the RITM records in sysapproval_approver table, I'm trying to get the value of catalog that the item belongs to.

I'm using 'sysapproval.cat_item.sc_catalogs' (taskGR.addQuery('sysapproval.cat_item.sc_catalog','catalogs');) to get this value but that does not give me the correct value I guess because there is no change in the number of records queried after applying this filter.

Can anyone help me to know what query should be used to get the catalog name from sc_catalog table for a given approval record.

 

Thanks,

Nisha

21 REPLIES 21

Brian Lancaster
Tera Sage

I'm not sure I understand you code at all.  But if you are querying the sysapproval_approver table you should can look at the approval_for field which is a reference to the sc_req_item table and from there you should be able to dot walk to item.name.

n20
Kilo Explorer

Hi Brian,

The name for column 'Approval For' is sysapproval, so here I'm querying the sysapproval_approver table against sysapproval and dot walking to the item and from item I need to find the catalog for that the item belongs to.

so that is how I used dot walking here  - sysapproval.cat_item.sc_catalog

find_real_file.png

 

find_real_file.png

 

 

Hope I'm clearer now.

Thanks,

Nisha

Yes that sounds right is sysapproval is the approval_for column.

richard38
Tera Guru

 

In my London instance the catalog item isn't on the REQ so getting that from sysapproval_approver is limited. I had to get it by going REQ>>RITM>>Catalog Item.

 

find_real_file.png