Get Value from MRVS

Marina15
Tera Expert

Hi.

I have a multi row variable set with two variable. I automatically load one variable on page load, 52 records are immediately displayed. The second field I need to fill in manually. I need that when changing the second field in a certain record, a required field appears after the variable set. I can't figure out which script is better to use, for an item catalog or for a variable set. If I use the OnSubmit script on a variable set, then it returns an empty value of mrvs to me

Thanks in advance!

4 REPLIES 4

Allen Andreas
Administrator
Administrator

Hi,

Are you able to use a UI Policy that has a condition that if the field you're talking about from your variable set is 'x' then use a UI Policy Action (related list at the bottom of the UI Policy page settings) to show your other field visible = true and mandatory = true.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

if you set up a UI policy in a multirow variable set, then in UI policy Action allows you to select variables only from this variable set. And I need to make visible a simple variable that is not related to mrvs

Hi,

Understood. So then via script you can use an onChange client script (on the variable set) and then choose the correct variable that you want it to execute on, but you should be able to use your non-variable set in that script such as:

if (newValue == 'value here') {
g_form.setMandatory('field_name', true);
}

So value would be the sys_id? or the value/record you want the other field to be mandatory on. field_name would be the name of the other variable.

Can you try that?

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

For example I have mrvs

var options
var1  
var2  
var3  

The var column is read-only. I want when I change the options specifically in the var2 record, a required field was displayed. That is, I need to somehow bind to the record, I don’t understand how