
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2020 12:56 PM
I have a Catalog Client Script in a Catalog Item and everything works but the line shown underlined in red in the photo below. I'm trying to get option 1 from a select box to be selected if the user chooses yes for a variable at the top of the form. the showFIeldMsg and other setValues work as expected but nothing happens to the windows_hardware_options select box.
I also tried with the value being '1' instead of just 1 but that didn't help. Here is the variable 'windows_hardware_options' and the first value 'standard_laptop':
What am I doing wrong?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2020 01:37 PM
Hi Annie -
You will have to set it with the value of your selectbox. If the value is numeric, then
g_form.setValue('windows_hardware_options', 1);
If the value is text, then
g_form.setValue('windows_hardware_options', 'standard_laptop);
**Mark this response as accepted answer/helpful, based on impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2020 01:37 PM
Hi Annie -
You will have to set it with the value of your selectbox. If the value is numeric, then
g_form.setValue('windows_hardware_options', 1);
If the value is text, then
g_form.setValue('windows_hardware_options', 'standard_laptop);
**Mark this response as accepted answer/helpful, based on impact.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2020 01:39 PM
Taking out the 1 worked, thank you!! I could have sworn I tried that originally but I guess not. 🙂