- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2020 06:35 AM
Hello,
I have record producer with 2 variable sets. I need to decide whether to show the second variable set based on the value that is entered in the first variable set. I assume that a UI Policy or a client script should solve this issue, however, it seems that accessing variables from another variable set is not a straight-forward task. Please let me know if you have tried something like this before.
Note: Both variable sets are multi-row variable set.
Thanks,
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2020 01:10 AM
Use the onSubmit client script on catalog item level.
Limitation MRVs
Note:
- Catalog UI policies and catalog client scripts defined at the item level are not applicable for variables in a multi-row variable set. Only those catalog UI policies and catalog client scripts defined within the multi-row variable set are applicable for variables in the multi-row variable set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2020 01:01 AM
If you have tried it and it worked with you, you would do me a great favor if you can add a screenshot.
If you haven't tried it yet, please try it to understand what type of problem I'm facing 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2020 01:39 AM
here we go, i tried to hide it one variable set based on another variable set variable value on form.
i am not sure what exactly have you done, first point, why are you doing it on onSubmit() ? why not on change ?
screenshot for reference
first variable set variable.
Second variable set variable
RP form,
function onSubmit() {
//Type appropriate comment here, and begin script below
if(g_form.getValue('one_vs') =='harsh'){
alert('coming inside if');
g_form.setDisplay('another_vs',false);
return false;
}
}
Hope it will help you.
now let me know if you have any further questions on it.
Note: This will even hide or show the variable sets based on the condition .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2020 02:34 AM
Hi Harshvardhan,
Thanks for your effort and for trying to help.
I tried what you suggested but it didn't work. Can you please send me a screenshot of the client script.
There is important thing that I didn't clarify in the original post: the variable sets are multi-row variable sets.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2020 02:59 AM
here we go, tested for MRVs as well. working fine.
function onSubmit() {
//Type appropriate comment here, and begin script below
if(g_form.getValue('one_vs') =='harsh'){
alert('coming inside if');
g_form.setDisplay('appss',false);
return false;
}
else{
g_form.setDisplay('appss',true);
}
}
Note: "appss" is my MRVS internal name.
screenshot for reference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2020 05:20 AM
Hi,
I don't really get your solution. How come your code runs on Submit but the variable set to which it is attached is single-row variable set?
Note: both my variable sets are MRVS