The CreatorCon Call for Content is officially open! Get started here.

Parent mrvs variable passing the value to child variable through script include, its not updating

servicenow pla1
Tera Expert

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

servicenowpla1_0-1728989932124.png

 

Advance Thanks yours response



1 ACCEPTED SOLUTION

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.

 

View solution in original post

21 REPLIES 21

In MRVS also same error value retuned
is_this_related_to_business_application_or_technical_service_1:com.glide.catalog.scripting.rhino.impl.GlideElementScriptingModel$2@3b462dc0,

First, do yourself a favor and shorten the variable name.  That might actually be causing the trouble.  What is the type of this variable?

both variable type is selectBox
now can't do the changes on backend value because this field called many places like business rules, client scripts, script includes.

Actually same mapping we have done other child RITMs with same variable but here this field have been working fine.

present function only it showing Issue and I used same dot walking for fetching value.

What is the value of the choice that should be displayed for this MRVS variable on this RITM? It may have invalid characters or be detected as a nested object or something like that.

servicenow pla1
Tera Expert

Parent MRVS variable choice values are two only i.e

1 business application

2 Technical application