- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-30-2018 09:19 PM
HI All,
I have a requirement as below.
For multiple Record Producers(Create Incident), I want Category and Sub Category to be set as default (during OnLoad) based on the Record Producer.
For Example - If the Record Producer is "Create Incident for Desktop/Laptop Support", then set the Category to 'Hardware' and subcategory to 'Desktop/Laptop Support'
similarly
If the Record Producer is "Create Incident for Desktop Application Support", then set the Category to 'Software' and subcategory to 'Desktop/Laptop Support'
Can anyone please help me with the script
- Sai.
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-30-2018 09:59 PM
On each of your record producer, you need to write an onLoad client script and add this script in it.
g_form.setValue('category', 'software');
g_form.setValue('subcategory', 'desktop_laptop_support');
Note: You should replace the variable names for category and subcategory as in your variable set. Also the value should be the actual back-end value for your choices and not the Labels as you mentioned on query.
Please try this and let me know
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-30-2018 09:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-30-2018 09:54 PM
Hi Alikutty Karupamveetil,
Category & Subcategory are the Variables from Variable sets. We are using the same Variable set for Multiple Record Producers. So making default value will not work better for my requirement.
- Sai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-30-2018 09:59 PM
On each of your record producer, you need to write an onLoad client script and add this script in it.
g_form.setValue('category', 'software');
g_form.setValue('subcategory', 'desktop_laptop_support');
Note: You should replace the variable names for category and subcategory as in your variable set. Also the value should be the actual back-end value for your choices and not the Labels as you mentioned on query.
Please try this and let me know
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2019 12:10 AM
Hello Sai Venkatesh,
Is this answered? Do you have any other queries. If your query is resolved, please do mark the correct answer and close the thread