Auto generation field

Hi,

I've been creating an application for onboarding clients. For this I want to create an auto generated field in CDT. whenever a new client register for onboarding and successfully submits the form, automatically the unique onboarding number have to create for every client.

Is it possible to create?

Thanks in advance.

  Discussion posts and replies are publicly visible

Parents
  • So to be clear: you want to auto-generate a unique Reference Number for each onboarding process instance? The way I've done this in the past is to have a database table that stores a sequence number, and a stored procedure that increments and then returns the sequence number. The actual reference number might be constructed from, say, a date and the sequence number itself e.g. 20220300005 - that is, the year 2022, the month of March (03) and sequence number 00005. Your stored proc would also determine if the currently stored sequence number is for a different month and, if so, reset the sequence to 1. 

    Using a table allows you re-use it for other sequence numbers for other contexts i.e. it could be a shared service across multiple applications.

Reply Children
No Data