Multi-Row Variable Set: How to control or set values outside MVRS?

nurinasyikin_
Tera Contributor

Hi, 

In my case, I have a variable set that contains one variable that should control the other variable outside the MRVS. 

 

1. If user select Traveling Advance = "No", 

nurinasyikin__2-1721183225102.png

 

2. The variables for "Air Ticket" and "Hotel Booking" should be optional, based on user selection on Traveling Advance = "No"

nurinasyikin__3-1721183241951.png


Is there any suggestion on how to make it work?

 

6 REPLIES 6

Hi @Community Alums I've tried the approach that you suggested. However, its not working where I got this error after creating that client scripts

nurinasyikin__0-1721638376456.png

 

Addy22
Tera Guru

Hi @nurinasyikin_ 

 

As mentioned earlier also, please write the client script on the catalog item not the variable set.

 

With this, you will have access to all the variables.

 

var value = g_form.getValue('traveling_advance');

if (value == "no"){

g_form.setMandatory('field_name', false)