Share ideas, ask questions, and get feedback about developing for ProcessMaker
Forum rules: Please post new questions under "Developing processes & programming" for ProcessMaker 2 or 3.
By marccathomen
#5354
Hi,
i'm playing around with PM Tables and i noticed that the PM interface for PM Tables does not support autoincrement fields for primary keys.
i configured a field called ID as integer(11) and as primary key.
in the created table (in wf_workflow) i added the autoincrement attribute to this field (using phpMyAdmin).
Now i noticed that when i change something in the table using PM Tables interface, then the autoincrement setting is deleted.
Is this a bug or a feature or do i just miss something?

BTW i'm really happy to have found ProcessMake since a product like this was missing a lot! Congratulations!

FYI i need the autoincrement feature because i want PM to create a new entry in the database and then allow the user to enter data via DynaForm. To do this i need the ID of the new record and this can be accomplished with autoincrement (which also makes sure that there is just one record with the same id)

thanks for your reply
Marc
User avatar
By amosbatto
#5402
I filed a New Feature Request for autoincrement in PM tables several months ago. See: http://bugs.processmaker.com/view.php?id=3645
I suggest adding a note to the bug report explaining your problem and request that this feature be implemented. (Sometimes that speeds up implementation).

If you want to add rows to the PM Table during the course of a process, you might write a trigger which uses executeQuery("SELECT MAX(MyField) FROM MyPMTable") to get the max value. Then add one to the max value and then use executeQuery("INSERT...") to write a new row with that new value to the PM Table.

Use the latest verified Temu coupon $100 off ([acq[…]

To get $100 off, sign up as a new user using refer[…]

To get $100 off, sign up as a new user using refer[…]

To get $100 off, sign up as a new user using refer[…]