how to create new fields in incident and catalog task.

brahmandlapally
Mega Guru

I want the new fields called 'Intial assignmnt group' and 'intial assignment agent' in incident table and catalog task. and those new fields should populate from "assignment group" and "assigned to" when incident is created. and  those fields need not be in form. those fields are used for preparing reports.

guide me if any knowledge.

3 ACCEPTED SOLUTIONS

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @brahmandlapally 

 

I want the new fields called 'Intial assignmnt group' and 'intial assignment agent' in incident table

Atul: What is the use case to create the new fields, it is customization. You can create

Go to Table -- Open the Incident Table - Scroll to columns / dictionary entry

create Field there

https://youtu.be/-dZvYnpuz3E

 

 

 

and catalog task.

Atul: Better create the new field on task table and use in other extended tables.

 

and those new fields should populate from "assignment group" and "assigned to" when incident is created. and  those fields need not be in form. those fields are used for preparing reports.

Atul:  Intial assignmnt group' --> Refer to Group  table

and 'intial assignment agent --> Refer to User table

guide me if any knowledge.

*************************************************************************************************************
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]

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

View solution in original post

csa #ServiceNow #TechnoFuncational Disclaimer: These videos are from my training batch. These videos did not promote any ServiceNow Sales pitch or marketing. These videos are only for knowledge purposes & basic on my experience & Knowledge. Redistribution or copying of functionality is not ...

Hi @brahmandlapally 

 

What exactly is your case ? Why you need to duplicate the values on form level?

*************************************************************************************************************
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]

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

View solution in original post

If this is your requirement, create 2 new fields using FORM LAYOUT as shown in attached picture ( Open any Incident record ==> Configure ==> Form Layout ) . Later on, remove these fields from form-layout as you don't want them on form, only in backend.

 

HSB_0-1703181544853.png

 

HSB_1-1703181589465.png

 

HSB_2-1703181604179.png

 

Then create a business rule ( Incident record ==> Configure ==> Business Rules ) ==> New ==> Populate as shown in the attached picture :

HSB_3-1703181678035.png

Put following code in it under ADVANCED - ( make sure you use the backend field names of new fields, no their labels )

 

 

(function executeRule(current, previous /*null when async*/) {

if(current.assignment_group!='' && current.u_initial_assignment_group=='')
	current.u_initial_assignment_group = current.assignment_group;
if(current.assigned_to!='' && current.u_initial_assignedagent=='')
	current.u_initial_assignedagent = current.assigned_to;

})(current, previous);

 

 

This will help you populate the new fields with whatever values were there in AssignmentGroup & AssiginedTo for the first time.

 

Later just add these new 2 fields in the report, you will be able to see data under these two columns there.

 

Please do mark this answer as ACCEPTED / HELPFUL. Remember, you can always mark 2 replies as ACCEPTED ANSWER as well.

View solution in original post

15 REPLIES 15

small doubt here  I want this fields in both incident and catalog task. so what to do in this case?

should i create those fields separately in each table.

NO, @brahmandlapally 

Create on TASK table and use in Incident and catalog task.

*************************************************************************************************************
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]

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

thank you this really helped me. here i want in intial assigning agent is the name or the person who going to fill assigned to intially on ticket.

thank you this really helped me. here i want in intial assigning agent is the name or the person who going to fill assigned to intially on ticket.

yes correct.