Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Record producer

Community Alums
Not applicable

Hello Team,

 

I have request to create 4 tasks under record producer on the basis of condition:-

 

e.g:- Suppose I have drop down list having options A,B,C,D  when I have selected   option A then Automation task needs to be create for assignment group A.

Same for other options B, C and D as well . Could you please help how we can create those tasks,.

 

Please let me know below how we achieve though below:- how we can achive this  script.

 

ooo_0-1732610886666.png

 

 

9 REPLIES 9

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Community Alums 

 

You can use the flow designer for same. get the catalog varaibles and use that in action.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Community Alums
Not applicable

can you help me with example , on flow designer?

 

Thank you. 

Hi @Community Alums 

 

https://www.servicenow.com/community/itsm-forum/attach-a-flow-designer-flow-to-record-producer/td-p/758700

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

BHARGAVI M
Tera Contributor

Hi @Community Alums 
You Can use like below code,
if (producer.varible_name == 'A') {

var  gr = new GlideRecord('table_name');

gr.initialize();

gr.assignment_group = "sys_id_of_assignment groupA"; //assignment group A
// map remaining varibles if required

gr.insert();

}
if (producer.varible_name == 'B'){

var  gr = new GlideRecord('table_name');

gr.initialize();

gr.assignment_group = "sys_id_of_assignment group B"; //assignment group B
// map remaining varibles if required
gr.insert();

}

if (producer.varible_name == 'C'){

var  gr = new GlideRecord('table_name');

gr.initialize();

gr.assignment_group = "sys_id_of_assignment group C"; //assignment group C
// map remaining varibles if required
gr.insert();

}
if (producer.varible_name == 'D'){

var  gr = new GlideRecord('table_name');

gr.initialize();

gr.assignment_group = "sys_id_of_assignment group D"; //assignment group D
// map remaining varibles if required
gr.insert();

}


Thankyou