- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2025 10:08 AM - edited 03-13-2025 10:09 AM
Hi SN Community,
I have this requirement to auto populate what was selected in single select variable to my multi row variable field item.
How to achieved this?
I'm using client script below: But its not working.
var upgradeOpt = g_form.getValue('upgrade_options);
if (upgradeOpt == 'Memory Upgrade') {
g_form.setValue('item', 'Memory Upgrade');
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2025 10:12 AM - edited 03-13-2025 10:14 AM
You can use g_service_catalog to get variables from outside of the MRVS, and you need a closing quote on the variable name:
var upgradeOpt = g_service_catalog.parent.getValue('upgrade_options');
The rest of your script should be fine as long as the value of the single select variable (not the text/label of this choice) is exactly 'Memory Upgrade'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2025 10:12 AM - edited 03-13-2025 10:14 AM
You can use g_service_catalog to get variables from outside of the MRVS, and you need a closing quote on the variable name:
var upgradeOpt = g_service_catalog.parent.getValue('upgrade_options');
The rest of your script should be fine as long as the value of the single select variable (not the text/label of this choice) is exactly 'Memory Upgrade'.