How to access variables in client script of variable set within the same catalog item?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2021 08:45 AM
As many have already posted on the community to try,
g_form.getValue('variables.variable_name');
but I haven't seen any Accepted Solution marking this to be the correct answer.
Even I have tried it but it's not working for me.
I have even tried using just
g_form.getValue('variable_name');
but nothing is working for me.
Is there any solution to how to access variable in client script of variable set of type Multi Row Variable Set (MRVS) belonging to same catalog item on service portal.
I am trying to populate a variable in MRVS using variable set client script depending on a value of variable from record producer.
P.S I have this catalog item in Human Resources : Core
Since I want to access the variable in variable set, the 'Applies to' on the client script has been set to 'A Variable Set' and 'UI Type' is set to 'All'.
Please let me know solution to this issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2022 09:05 AM
Hi Sumit
can you please tell me if you have achieved this ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-10-2024 03:28 AM
Did you find the solution?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2023 02:10 PM
You can use the g_service_catalog API:
g_service_catalog.parent.getValue("variable_name")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2024 11:57 AM
similar issue here- but instead of mrvs, i'm on an order guide.
I have a variable set "request_information" with a variable "requested_for_agency" that's typically set with default value of javascript:gs.getUser().getCompanyID().
OUTSIDE the variable set on the order guide, i'm trying to use that requested_for_agency value to control what choices are available on a select box variable with a catalog client script. I cannot seem to get a value to return for that agency value.
i've tried many versions, here's one: