Get Value from MRVS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2022 06:32 AM
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!
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2022 06:36 AM
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2022 06:42 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2022 09:22 AM
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2022 02:54 AM
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