Relate request item and change

nortonxnorris
Giga Expert

I have added a variable on a RITM, called 'Related Change' which is a reference to the change table.

When i select a change on the RITM form, I would like this to be displayed on a change ticket, under a related list.

I have created a new relation, called 'Related Request' on a change form.

This is pulling all RITMs in the system, however, i would like it to be filtered to only the RITM that has the change in the variable.

Query used: current.addQuery('request_item.variables.related_change',parent.sys_id);

Where am I going wrong?

6 REPLIES 6

ebaileyybs
Tera Expert

Hi, when you created the reference to change_request from the requested item table it will have automatically created a Related List. Go to change > configure > related lists. There should be a related list between the two table which has been auto created. The name will be Change Request > Requested Item or something similar.



Thanks


Hi Emma,



I have not created a reference on the sc_req_item table. I have created a variable of type 'reference' on an RITM form.



My relationship is querying from the Requested Item table, and applying to the Change Request table.


This relationship is successfully displaying all RITMs under the list.



However, Im looking to filter that list, to display the RITM, where the variable value = change request number.


Hi Norton



I don't think you can query the variables directly in that way.


Probably you have to create a more complex script querying the following table 'sc_item_option_mtom' collecting the list of changes you need to restrict.


Cheers



R0bo


Suresh1
Tera Guru

Hey Norton,



You can do this. Create a custom field on TASK table and add that custom field on the Request Item form.


Go to Change request form Personalize and in the "Related Lists", add that Related List which is having link to Request item . In this way you can relate. Check the below snap for reference.


find_real_file.png



Best Regards:


Suresh. D