Generating unique ID with prefix

Hi Team,

I want to generate a unique ID with prefix and ID should be in incrementing order.

ex: ID-1,ID-2,…etc.

@SaiG5925 Hi, You have to make use of Work-.GenerateID activity & also have a look over here database table (PC_DATA_UNIQUEID)

More info can be found over here https://collaborate.pega.com/discussion/case-id-generation-mechanism

Thanks

@SaiG5925 . This will help !! @pzGenerateUniqueID(tools, “prefix_here”)

@uashok93 How about incrementing from 1? This function is all about just the unique id right? & How about number of characters?

@AkshithReddyT Give it a try Akshith , if Prefix is “A” it goes like A-1, A-2, A-3,A-4 ,A-5 …

@SaiG5925 Case ID generation has been changed since Pega v8.3. You can find detail here - https://collaborate.pega.com/discussion/case-id-generation-mechanism

In short, follow the below steps:

  1. Create a DSS idGenerator/ID-/batchSize with value as 1.

  2. Restart the server.

  3. Use Work.GenerateID activity and pass the prefix as ID-.

@uashok93 this function is working