How to set Category and Subcategory for multiple Record Producers?

User177031
Kilo Guru

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.

 

1 ACCEPTED SOLUTION

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!

 

View solution in original post

5 REPLIES 5

Alikutty A
Tera Sage

Hello,

If these are default values for the record producer, you could set this as the default value in the category and sub-category variables and it would populate automatically and then map those variable to the incident fields.

find_real_file.png

Thanks!

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 

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!

 

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