cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate V
Advocate V

Can't seem to add an edit form for certain data sources

Hi hoping someone can help me here. I am trying to add a form to allow users to create a new record in and SQL table hosted on Azure.
The strange thing is, I can add edit forms when using some tables in the database, but not others.

For on specific table it will only allow me to view not edit or add.
I have tried adding a button control with NewForm(MyForm) but this does nothing.
Is there something I am missing here. All the tables were created in the same way at the same time


1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Advocate V
Advocate V

Found the solution. The table I was trying to create a form for had no primary key. Once created form works as expected.

View solution in original post

4 REPLIES 4
Highlighted
Community Support
Community Support

For EditForm,  two things that you need to take a check:
1. DefaultMode property,

 It has three value type, Edit, View, New

If you would like to Create New record, then please make sure the Defaultmode is set to FormMode.New.

 

For more information about how to work with form control in PowerApps, see:

Understand data forms in Microsoft PowerApps

Displayform and EditForm in PowerApps

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted

Hi Michael

Thanks for your response. I have tried changing the default property to no avail. Interestingly this problem only exists for certain data sources. I have 4 tables in an SQL server and I can easily add a form with default.new as the property for three out of the four tables. It's just one table giving me the problem. I will try deleting the table from the SQL server and recreating it. That might help.

Highlighted
Advocate V
Advocate V

Found the solution. The table I was trying to create a form for had no primary key. Once created form works as expected.

View solution in original post

Highlighted

2 years after and this post save me!!!!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,822)