cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
seanbrogan
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
seanbrogan
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
v-micsh-msft
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.

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
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

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

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (81,382)