How to track number of times a field is changed into the Activities section on a form?

thrsdy1512
Tera Expert

Hi 

I'd like to track the number of times a field changes in the Activities section on a form. There is a 'Outcome' field that has been added to the form & I want the Activities notes to increment number of times that field has been changed. I am working with the Change Task table. 

 

I would also this number to be visible in a read only field that is displayed on the form.  What is the most straightforward (ie - beginner level 😊) way of achieving this? 

 

Thanks

1 ACCEPTED SOLUTION

@thrsdy1512 

your business rule should be Before and not after

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

7 REPLIES 7

Voona Rohila
Kilo Patron
Kilo Patron

Hi @thrsdy1512 

You can write a before Insert/update BR which triggers when 'Outcome || changes' 

In the script part use below code : Give the field name of the number field which is storing the count

current.fieldname = current.fieldname +1 ; //use proper field name here

  


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Ankur Bawiskar
Tera Patron
Tera Patron

@thrsdy1512 

I agree with what Mark has mentioned.

We would like to know the business use-case for this.

You can create a field as per suggestion by Mark and increment it everytime field is changed.

Please let us know if any further help required.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @thrsdy1512 

 

Could you clarify what your business case is in this context, and what you plan to do after retrieving these records? Understanding the objective will help in determining the next steps and how to handle the data effectively.

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

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