Missing User Level ID when it's autoincrement

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
gcjesus89
User
Posts: 58

Missing User Level ID when it's autoincrement

Post by gcjesus89 »

Hi, i have a basic User Level Table empty :
ID: PK, not null, autoincrement.
UserLevelName: Not null.
This table has been created using the option "Create tables" in the "Dynamic User Levels" tab in "Advanced Security - User Levels".

My page is configured to not showing the ID column cause it's autoincrement and to prevent to try adding repeated value.

in the web page my Add form is like this (just as i want):

  • User Level Name: _______________
  • Permissions: Add () Edit () .... .... ....

I filled all the required fields and i get this message: "Missing User Level ID"
I though it was because Required attribute was checked in the ID field. i desactivated it, regenerate all the code and that message is still appearing. I don't know why if it is an autoincrement field. I'm using the v11

Thanks for you help.


mobhar
User
Posts: 11732

Post by mobhar »

Try to put this following code in "Row_Inserting" server event:

unset($rsnew["ID"]);


Webmaster
User
Posts: 9427

Post by Webmaster »

gcjesus89 wrote:
My page is configured to not showing the ID column cause it's autoincrement and to prevent to try adding repeated value.

How did you "configure" not to show? If a field is properly detected as autoincrement and is the primary key, the checkbox in the "Add" column of Field Setup page should be disabled. If not, post the database type and the CREATE TABLE statement of the table.


Post Reply