Status update calls

diannemcintosh
Tera Contributor

Does anyone log or count the number of times a user calls for a status update on a task? When there are 3 calls, raise the priority on that task.

2 REPLIES 2

Karthiga S
Kilo Sage

Hi @diannemcintosh 

 


Yes, you can achieve this in ServiceNow by creating a custom field to count the number of times a user calls for a status update on a task and then use a business rule to increase the priority when the count reaches 3. 

1. Create a custom field on the Task table:
- Navigate to System Definition > Tables.
- Search for the Task table and open it.
- Click on New to create a new field.
- Set the Type to Integer, and give it a Label and Name (e.g., "Status Update Calls").
- Submit the new field.

2. Create a Business Rule:
- Navigate to System Definition > Business Rules.
- Click on New to create a new business rule.
- Set the Table to Task, and give it a Name (e.g., "Increase Priority on 3 Status Calls").
- Set the When to run to "before" and Check the "insert" and "update" boxes.
- In the Advanced tab, write a script to increment the "Status Update Calls" field and increase the priority when it reaches 3.

(function executeRule(current, previous /*null when async*/) {
// Increment the count of status update calls
current.u_status_update_calls += 1;

// If the count reaches 3, increase the priority
if (current.u_status_update_calls == 3) {
// Assuming 1 is the highest priority
current.priority = 1;
}
})(current, previous);


3. Test the functionality:
- Create a new task and update it multiple times.
- Check if the priority increases when the "Status Update Calls" count reaches 3.

 

Please mark it Correct and Hit Like if you find this helpful!

 

Regards,

Karthiga

Thank you for your reply!