Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

How to reset the service call ID once in a month

Highlighted
Raam.K
Occasional Contributor

How to reset the service call ID once in a month

How do I reset the service calls once in a month and prefix month and year the service calls ID.

7 REPLIES
Ruth Porter
Honored Contributor

Re: How to reset the service call ID once in a month

Hi there,

The ID field as issued from HP, cannot be altered once set.

You could use a custom field for this and use rules which set this using the variables $MM$ for month, $YYYY$ for year.

Hope this helps, Ruth
http://www.teamultra.net
Raam.K
Occasional Contributor

Re: How to reset the service call ID once in a month

Hi Rith,

Me creating a custom filed will help me in month and year but i would like to run counter for service call where every month it resets and counter begins from one.
Ruth Porter
Honored Contributor

Re: How to reset the service call ID once in a month

Hi there,

You say you would like to run counter for service call where every month it resets and counter begins from one.

Not sure that you can do this; why is this so essential to you? The registration;created time will tell you when the call was created; would not that do what you need?

Regards, Ruth
http://www.teamultra.net
George M. Meneg
Honored Contributor

Re: How to reset the service call ID once in a month

Hello Raam,

Do as Ruth suggests. You cannot alter the format of ID. You could reset it but unless the previous entries are deleted you are going to have trouble.
menes fhtagn

Re: How to reset the service call ID once in a month

Hi,
First some preparations - you need one common object for all service calls to store historic information.
Could be several ways to do it:
1. if all clients are from the same organization, then you can use client's organization object for storing info
2. If all people selected in "assigned to" are from the same organization - use that object
3. registration person? services? hidden organization/person/ci field? everything is ok

I asume that you have one common organization for all sc.

Steps:
1. create custom number field for organization to store ID field value "last_id"
2. Create rule "after SC was created if organization.modified_date=last month then organization.last_id= sc.id" (notice that "organization.modified_date" changed to current month) - this rule sets the first sc id in this mont
3. Create rule "after SC was created if organization.modified_date=this month" then custom field= prefix+(ID- organization.last_id)

I leave you the part where you need to make sure that 2 rule will fire before 3 and what to do if there were no sc for all month


Rytis
raam.mk
Super Collector

Re: How to reset the service call ID once in a month

Hi,

Ruth George please help..

Expecting for a solution for this
Raman Shcharbak
Frequent Visitor

Re: How to reset the service call ID once in a month

1. You can set the next ID of ServiceCall directly in DB modifying corresponding row for servicecalls in .. xxx_sequences (don`t remember exactly) table. You can do it by hand or on schedule running once in a month (by using sql agent jobs in MS SQL or sheduler in Oracle). Lets assume that you have about 2000-3000 Servicecalls in a month So, at first second of september your job will set next ID for 20070900000 (for example five zeroes after YYYYMM - on zero as a divider, other zeroes for 4-digit SC IDs. So, the first created SC in September will have ID 20070900001.

By the way, Rytis Damalakas`s offer also looks good.
//Add this to "OnDomLoad" event