Catalog Item - MRVS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Team,
We have three variables in MRVS, lets say MVar1 , MVar2, MVar3.
And one reference variables outside MRVS, lets say Var4.
Based on the value in reference field Var4, we have to populate value in MVar2 and MVar3.
What I did is, I have created oncHange client script for Var4 which will be setting value MVar2 and MVar3.
g_form.setValue(MVar2,value1) ;
g_form.setValue(MVar3,value2).
But this is not working. Please guide, how can I achieve this .
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @TejashviT x
Try with this once as from item level Onchange Catalog Client script on variable Var4- you want to set MRVS variables
var mrvsArray = [];
var firstRow = {
"MVar2": "value 1",
"MVar3": "value 2"
};
mrvsArray.push(firstRow);
g_form.setValue('your_mrvs_internal_name', JSON.stringify(mrvsArray));
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti