Question


Zensar Technologies Ltd
IN
Last activity: 15 Jan 2024 4:35 EST
Generating Custom Case ID
Hi All, I have a requirement, While creating the, the Case ID should be like this :- C-3560-1 next will be C-1560-2, case id's should be unique and at last -1,-2,-3 should be in sequence incremented by one. How we can achieve this?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 15 Jan 2024 4:35 EST


Tata Consultancy Services
IN
Hi @AbhishekC1725,
You can update the Work ID Prefix as mention below, under cases and data in application definition rule form and also we can use pyDefault Data Transform.
You can use either of one, But if you mention in the both places, it will override the pyDefault value and set the value from the application definition rule form.
pyDefault
and Could you please go through below article it is very nice article.
I hope this will help you.
Thanks,
Ashok
-
Abhishek Choubey


Zensar Technologies Ltd
IN
@Bhumireddy Thanks Ashok for response. Just one more thing need to confirm, suppose we have one grid displaying Parent case id + Account Name + Add Child Button. For example Parent CaseID = C-5008, when user click on Add Child Button Child case should get created with ID
C-5008-1 and when again clicked C-5008-2 How to achieve this?


Tata Consultancy Services
IN
Hi @AbhishekC1725,
You can use above method either of one, It you will get the sequence of the ID.
When you doing the test from the Build an Expression, you will get like this C-3650-1 , second time = C-3650-3, third time - C-3650-5 like this we are getting, and If you CheckIn the rule, You will get the different sequence.
Thanks,
Ashok
-
Abhishek Choubey


Zensar Technologies Ltd
IN
@Bhumireddy Yes, it is working😊


Aaseya IT Services Pvt LTD
SA
You can use the approach as suggested by @Bhumireddy . That would be recommended approach.
If you are using any custom activity or DT to create the WO, you can use the below function also to accomplish the same.
@(Pega-ProcessArchitect:Utilities).pzGenerateUniqueID(tools,"C-3650-")
-
Abhishek Choubey
Updated: 15 Jan 2024 3:04 EST


Tata Consultancy Services
IN
Hi @PrakashDeep, @(Pega-ProcessArchitect:Utilities).pzGenerateUniqueID(tools,"C-3650-"),
If you are using the above function, you will not get sequence of the pyID, I mean it will generate the unique it, but not sequence.
E.g: (C-3650--21) after 21, you will get 31, 41, 51 like.etc.....there is a two Hyphen symbols there.
Thanks,
Ashok
-
Abhishek Choubey


Zensar Technologies Ltd
IN
@Bhumireddy Yes you are correct, we are not getting in sequence using this function @(Pega-ProcessArchitect:Utilities).pzGenerateUniqueID(tools,"C-3650") First it gives C-3650-1 , second time = C-3650-3, third time - C-3650-5 like this we are getting. @PrakashDeep


Zensar Technologies Ltd
IN
@PrakashDeep Thanks 😊 It is working fine after doing checkin.


Zensar Technologies Ltd
IN
@PrakashDeep Thanks for Response 😊