
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2015 10:13 AM
I have created a variable "Call counter" and another variable "Increment call" (which is a checbox), Here is my sceanrio:
1) Customer calls SD to have a ticket opened for an issue,
2) An hour later the customer calls back for a status, at this time the analysts checks the "increment call" button, the call counter starts at "0" and is suppose to increase each time the customer calls back.
3) So I need the call count value to be saved, I need the increment call option to be unchecked after the incident is updated, and I need the call counter value to increase by 1 the next time someone goes into that incident and clicks that increment call checkbox again.
Hope that makes sense.
Karen
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2015 10:25 AM
a before business rule would work for this i believe.
if(current.u_increment_call == true){
var count = current.u_call_counter;
current.u_call_counter = count + 1; // add one to the count
current.u_increment_call = 'false'; // reset the count increment flag
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2015 10:25 AM
a before business rule would work for this i believe.
if(current.u_increment_call == true){
var count = current.u_call_counter;
current.u_call_counter = count + 1; // add one to the count
current.u_increment_call = 'false'; // reset the count increment flag
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2015 10:50 AM
Hi Alex, thank you. Trying now, but not working.
I originally had this script set up as business rule should I have it as a calculated value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2015 10:55 AM
what table are the 2 fields you created on? I will mock this up in a demo instance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2015 11:03 AM
Both variables are on the incident table. Thank you.