- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2024 11:22 PM
Hi! Can anyone tell me how to change or modify the options in a Select Box variable from a Variable Set using an onChange() Client Script that looks for a variable in the form?
The idea is that when the user selects a country in the form, it should affect the options in the Select Box from the Variable Set.
I created a Client Script that checks which country is selected and then uses GlideAjax to determine the selected country. In my Script Include, I return options = []; with values and labels. I can see this variable in console.log(), and it looks fine. However, I’m not sure how to access the Variable Set variable through the Catalog Client Script.
I tried different methods, such as name_variable_set.name_variable_from_variable_set, but it didn’t work. ex. g_form.clearOptions('name_variable_set.name_variable_from_variable_set');
Can you please help me? Is it possible to achieve what I'm looking for?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2024 11:45 AM
Multi row client script in variable set to get a variable value from catalog item form.
var workLocation = g_service_catalog.parent.getValue('name_of_the_variable_in_the_catalog_item');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2024 11:45 AM
Multi row client script in variable set to get a variable value from catalog item form.
var workLocation = g_service_catalog.parent.getValue('name_of_the_variable_in_the_catalog_item');