I have an edit form bound to a mysql database. I can edit records fine, but I can't create new records unless I display the id field and enter something. id is the key field in the table and is set to auto-increment. I set the required flag for the field to false and it still doesn't work unless I enter a number in the id field on the form.
Ideally, I wouldn't even show the id field on the form and it would just be created and auto-incremented when the record gets inserted. What am I doing wrong?
Hi @kman42 ,
If you cannot create new record, did you encounter any error message while submitting a new record via edit form?
You could add the id field to the edit form, then set its Visible property to false and then have a try.
Check if below thread has any information that might help:
I'm still trying to create a workaround for this issue. I'm trying to set the default value for the id card to the parent value if the form is in edit mode and to the max value of the database field +1 if it is in new mode.
This results in:
The function Max has some invalid arguments. Invalid argument type (Table). Expecting a Number value instead.
id is an integer.
Check out the News & Announcements to learn more.
Did you know that you can visit the Power Query Forum in Power BI and now Power Apps
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
Check out our new Discover Your Career Path blog post series and get all the details.