cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
seanbrogan
Level 8

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
seanbrogan
Level 8

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

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
Community Support Team
Community Support Team

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

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.
seanbrogan
Level 8

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

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.

seanbrogan
Level 8

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

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

Veronica
Level 8

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

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

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,223)