Question
Auto-increment of Key in Data type
I have the requirement to automatically generate the ID to an entry of a delegated data type. When the user adds a new record, the key should correspond to the last id+1 (auto-increment). I have tried something similar to what has been described on https://community1.pega.com/community/pega-product-support/question/increment-primary-key-data-table. unfortunately I do not a find a way to mention the condition on a logic field.
***Moderator Edit-Vidyaranjan: Updated Platform Capability***
Below one of the options might work for you..
1. In Class rule form you can see an option "Automatically generate a unique ID for records of this type". This helps if you want the system to automatically supply a globally unique value for new instances, select this check box. Selecting this check box also changes the key name to pyGUID.
2. You can also perform auto increment from Database side, by creating the column as AUTO_INCREMENT.