How to auto populate a multi row variable set variable with value selected in drop down type of a catalog item variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2022 11:50 PM
Hi All,
I have created a multi row variable set on a catalog item. I need to auto populate a MRVS variable with the value selected in select box type variable.
For example, select box type variable is 'AB' and MRVS variable is XY.
AB has drop down values as P,Q,R. If I have selected 'P' in AB, same should auto populate in XY. Please help me to get this.
Any help would be appreciated.
Thanks in Advance!!
- Labels:
-
Multiple Versions
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2022 11:56 PM
MRVS field accepts JSON formatted data. You can create an OnChange client script and use below code:
var result = {
<XY_FIELD_BACKEND_NAME> : newValue,
}
g_form.setvalue('MRVS_BACKEND_NAME', result);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2022 12:45 AM
Thanks for your quick response!!
I tried, but no luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2022 11:58 PM
Hi
Here is an article which will help you:
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2022 12:01 AM
Hi,
there are some questions for your approach
So MRVS has only 1 variable XY in it or any other variable?
So on every change of Select box you want to add new row in MRVS or just change the variable value and keep only 1 row
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader