Need help to make field mandatory in multirow variable set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2022 05:45 AM
Hi Everyone , I have a requirement on catalog item , we have two variable and a multirow variable set(Test1) on catalog item. Our requirement is when we select 1 in first variable (Copier paper) and 2 in second variable (
Pens) then Field1 inside multirow variable set should become mandatory. Please see screenshot below
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2022 06:37 AM
So I know a little "hack" for this, but I am not sure if there is any other method to it. If there is, I am not aware, and I am very keen to learn!!
Edit: ServiceNow has added a new api for this if in Quebec or later. Solution available on developer here or docs here
But basically, you can create a global variable in the onload catalog client script on the catalog item:
Then on your multi row variable set you can create an on-load client script, that retrieves this value, by using the global variable set (in this case "store_gform_value"), and then the known syntax:
This should result in the below:
And just to check if other values:
Please mark my answer as Correct & Helpful, if applicable 🙂
Best regards,
Sebastian Laursen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2022 07:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2022 07:41 AM
Are you sure the variables are correct? I just randomly named them 🙂
Best regards,
Sebastian Laursen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2022 07:45 AM