- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2023 10:25 AM
I have an onSubmit script within a single-row variable set (Applies to: Variable Set) that checks a particular variable and if there are less than two people selected, it provides an error and doesn't allow submission. That variable set is active if a particular request type is selected. However, when another request type is selected the script within that single-row variable set is still being called on when trying to submit the request and not allowing submission. Aren't the client scripts supposed to be applicable to only the variable set they're in?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2023 11:38 AM
You would need an if statement more like this:
if (g_form.getValue('request_type') == 'Group Create') {
The variable named request_type can exist within or outside of the variable set in this case. You would also want to confirm that 'Group Create' is the value stored in that variable - if it's a select box you could have that has a choice label, but a different value. MRVS onSubmit scripts are triggered when the Add button is clicked (the second time, inside the Add Row dialog window) and can interact with the parent form (other Catalog Item variables).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2023 12:23 PM