Record producer related

Virat05
Tera Contributor

Hi ,

 

Virat05_0-1716790460725.png

 

I have check box variable on record producer, no other varaibles available

if i click that check box incident should be populated with following mappings

category,subcategory,description,assignment group etc.

 

i have written script on record producer is 

if(producer.cyber_security == true)

{

current.category = 'given category';

current.subcategory = 'given subcategory';

}

the above code not working , can anyone suggest way.

4 REPLIES 4

Community Alums
Not applicable

Hi,

 

category and subcategory on incident(current) is of choice type. So you need to use the backend value of category.

example : current.category ='given_category'

 

Sid_Takali
Kilo Patron
Kilo Patron

Hi @Virat05 

if(producer.cyber_security == 'true')
{
current.category = 'category choice backend value';
current.subcategory = 'subcategory choice backend value';
}

 

Regards,

Sid

Community Alums
Not applicable

Hi @Virat05 ,

Please try with below code 

if(producer.cyber_security == true ||  producer.cyber_security == "true")
{
current.category = 'given category';  // backend name
current.subcategory = 'given subcategory'; // backend name
} 

 

Please mark my answer correct and helpful if this works for you

Thanks and Regards

Sarthak

Sid_Takali
Kilo Patron
Kilo Patron

Hi @Virat05 Try below code, its working

 

if(producer.cyber_security == "true")
{
current.category = 'category choice backend value';
current.subcategory = 'subcategory choice backend value';
}

 

 

Regards,

Sid