trying to store an empty property ID to a database column that does not accept nulls: code: SQLState: Message:

In UI while insert the Record by using activity to push the record to data table . i have below erroe.

 trying to store an empty property ID to a database column that does not accept nulls: code:  SQLState:  Message:

i have attach the below screenshots.

@nagar16730416 Can you please check if the value for the ID (key of Database) column is set properly?

@SrinidhiM THANKS for your replay .yes its set properly

@SrinidhiM i attach the below screenshot .Thanks

@SrinidhiM Thanks for your reply. i have attache the screen shot below. sry i am just learning pega if i am worng correct me pls. Thanks.

@nagar16730416 Can you also share the screenshot of Primary Page?

@SrinidhiM thanks for your reply. i fix the error. and i have another doubt can u tell me any logic for auto GenerateID ..

@SrinidhiM I try this first logic and i have some .i attech the screenshot below. Thanks

@SrinidhiM YES I use the second logic its working. but ID number is coming like this 46834664.i attach the screenshot below .but i want the numbers should be ID-1,ID-2.

@SrinidhiM Thanks for your reply . yes set properly.

@nagar16730416 Can you please share the values of property that are set on the ubdatapage and keys of your table

@nagar16730416 The Property that you are using for the ID is Decimal/Number so it is not accepting the alphanumberic character. You can try out any one of below two options:

  1. Change the ID property to String or

  2. Use the @CreateUniqueID() function

@nagar16730416 please check the available documentation:

Generate sequential Unique ID for property without any prefix

Increase performance for work ID generation (8.3)

Case ID generation mechanism

Work Unique ID (pyLastReservedID) getting increased abruptly post upgrade to Pega 8.3

Sequence of case IDs generated is incorrect

The latest documentation about this setting can be found in Default dynamic system settings

Also as the original question about the Database column population was fixed, could you please provide details on how you fixed it and mark this question with Accept Solution?

@nagar16730416 Then you might need to change the ID property to Text , that will resolve your requirement. Also, please check the links provided @MarijeSchillern that is according to your requirements

@SrinidhiM HI,

In Table how to Ubdate the record by using Activity help me to achive this.

Thanks.

@nagar16730416 Hi,

  1. Obj-open-by-handle using the key of the record you wish to update (Fetch the key based on the requirement - for e.g if you are editing from table layout in UI record by record, your Key should be available in the row Primary)

  2. set the updated properties

  3. obj-save with write now (please use ootb activities like Save-Page to commit instead of methods)

These are the steps to be included in the activity, Please check Savable data pages instead of activity

Savable Datapages: Savable Datapage

@SrinidhiM Thanks for your reply.let me try .

@nagar16730416 Hi You can use any of the functions from below:

@GenerateID(“ID”)

@pxGetUniqueID(tools)

@CreateUniqueID()

@SrinidhiM ok Thanks.

@SrinidhiM hi

help me for this.

how to change the case id format. if u have screen shot share me pls