Page 1 of 1

Customize Case Number

Posted: Sat May 18, 2019 9:27 am
by njhajhajha
Im using Process Maker 3.3.6 community version.
I want to customize case number which are auto generated in Process Maker.

For example:change case 71 in this Page to 185201971(current date + case no)

Thank You.

Re: Customize Case Number

Posted: Tue May 21, 2019 12:49 am
by amosbatto
ProcessMaker doesn't support that. What you can do is write a new value to the APP_SEQUENCE.ID field in the database. Then the next case will add one to that value for its case number.
You could create a process with a timer event that executes a script task once per day that sets today's date in the APP_SEQUENCE.ID field. Set the timereventcron.php file to periodically executed by the server where ProcessMaker is installed.
Here is the process you can use:
(36.46 KiB) Downloaded 32 times
It contains this trigger:
Code: Select all
//Set to a value YYYYMMDD0, like 201905210 (today's date), 
//so the first case today will be 201905211 and the 
//second case will be 201905212
$todayDate = date("Ymd0"); 
$sql = "UPDATE APP_SEQUENCE SET ID="$todayDate;
Make sure to change this line in your workflow/engine/config/execute-query-blacklist.ini file from:
So the trigger can write to the APP_SEQUENCE.ID field in the database.

The other option is to set the customized case number in the case label.