- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2019 03:57 PM
Follow up from: Add Advanced Reference Qualifier to Variable Set that is dependent on a Catalog Item field
In a Service Catalog(shown below) I am trying set a default value on the Product field when their is only one option from the reference table. I would also like to hide this variable or set it as a read-only field with the default option.
I have already added a reference qualifier(follow up link) to that field which will filter how many options are show. If there is more than one option, I want to do nothing.
I have been playing around with Business rules, Client Scripts and UI Policies, but none have been successful. Can anyone point me in the direct of the right script to write?
Thank you.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2019 09:23 AM
I think it needs to be an onChange client script using GlideAjax to query the server, and if the result set has only one member, then return that member, else, do nothing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2019 03:01 PM
Vinod Kumar Kachineni
Community Rising Star 2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2019 03:40 PM
That worked, thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2019 07:54 PM
Vinod Kumar Kachineni
Community Rising Star 2022