- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 03:59 AM - edited 10-15-2024 04:00 AM
HI Community,
Need yours assistance please on below issue
Parent RITM mrvs variable passing the value to child RITM variable through script include, its not updating actual value. Its updating "com.glide.catalog.scripting.rhino.impl.GlideElementScriptingModel$2@5533d9de" how to fix this.
parent MRVS variable type is selectbox and child variable type selectbox and using below script
ritm.variables.business_name = current.variables.MRVS.business_name;
Please find below screen shot and help
Advance Thanks yours response
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2024 11:36 AM - edited 10-18-2024 11:37 AM
Hi @Brad Bowman @Omkar Mone @sadif_raja
Thanks you all for your time and your suggestions, I have learned something new from your responses.
Finally I have done deep analysis on my code and find the issue and fixed.
Actually My requirement is
Parent RITM -> Child RITM->ChildRITM
1. Parent RITM variableset variable type is select box and child variable type is select box
2.Parent RITM variable have choice values
1.business_service
2.technical_service
3.child variable choice values different
1.business_app
2.technical_services
Both variables choice values is different so I mapped used below script
Var abName = current.variables.mrvs.variablename;
var is_business_app = ' ';
If(abName == 'parent choice value i.e business_service'){
is_business_app = 'child choice value i.e business_app';
}else if(abName == 'parent choice value i.e technical_service'){
is_business_app = 'child choice value i.e technical_services';
}
ChildRITM.variables.childvariableName = is_business_app;
Finally this code fixed the Issue, I hope this will helpfull others also.
Thanks to ServiceNow Community.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 04:35 AM
Hello,
Can you try ritm.variables.business_name = current.variables.MRVS.business_name.getDisplayValue();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 05:18 AM
HI I tried getValue() and getDisplayValue() both functions not worked
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 04:44 AM
You can get the parent RITM MRVS in its entirety using the mrvs_internal_name instead of the business_name (which is the name of a variable in the MRVS?). Once you have this value you can loop through (each row) to retrieve the value of a variable. In your scenario, to get the value of a variable named business_name in the MRVS that has the internal name of my_mrvs in the first row where it is populated - since there could be many rows/values for this variable and you are putting it into a single selection variable, this part of the script would look like this, if I'm following your example correctly:
var mrvs = current.variables.my_mrvs;
var rowCount = mrvs.getRowCount();
for (var i = 0; i < rowCount; i++) {
var row = mrvs.getRow(i);
if (row.business_name) {
ritm.variables.business_name = row.business_name;
break;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 05:38 AM
I tried same given functionality, value is not updating and also entire fields also doing empty this code