Pass parent RITM values to child RITm
						
					
					
				
			
		
	
			
	
	
	
	
	
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
11-04-2022 03:34 AM
Hello All,
Good day!
I have one requirement in which i have to trigger child RITM based upon parent RITM variable selection. I have done that through script. Now in Parent RITM, there is field caller Site ID. I have to fetch value associated with Site ID in Location table and have to set it for Child RITM's variable.
Can anyone help how to achieve this functionality ?
vorwerk_location is the reference variable in child RITM.
Site ID is field in parent RITM and location table.
-----------Script starts here ----------
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
11-04-2022 03:40 AM
Hi,
Please try below:
 if (grReqItem.next()) {
        grReqItem.variables.printer_details = 'Medium - Recommended for branch office';
        grReqItem.variables.elevator_available_at_location = 'No';
        grReqItem.comments = "Triggering RITM from parent with variables testing";
         //passing constant value for location in child SR.
         grReqItem.variables.vorwerk_location = current.variables.siteID.toString();  // use current.variables.variable_name.toString()
         grReqItem.comments = grReqItem.variables.vorwerk_location; */
        //grReqItem.comments = " Testing comments after varialbe value assiging.";
        grReqItem.update();
    }
					
				
			
			
				Thanks
Anil Lande
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
11-04-2022 03:41 AM
Hi
You can use current.variable.varaible_name to access variables of current(Parent) RITM.
And map it to the variables of child RITM as per your requirement.
Thanks
Anil Lande
