cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
afernand0
Regular Visitor

Edit Controls not available in Edit Form

Hi,

 

I have a canvas app connected to an Azure SQL database with a read/write credentials. And I added an edit form to the app and made the default mode to 'Edit' (also tried 'New'). However, when adding a field to the form, only view controls are available - see the attached image.

It would be great if someone can shed some light into why I cannot add an edit control.

 

Thanks,

Anton

 

 
1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

Did you create an Identity field (Primary Key) in the SQL database when you created it?  That's a requirement for posting back to SQL from Power Apps.  Without an Identity field the connection will be viewed as Read Only.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

8 REPLIES 8
GeraldDahl
Helper I
Helper I

Hi Anton - the same thing happened to me after I created a canvas app connected to the Contacts entity from CDS. The primary field "fullname" appears as view only and the options associated with the control are the same as you have shown in your capture1.png. Hopefully it's just a glitch that Microsoft will note and repair shortly.

Hi @GeraldDahl 

 

Thanks for your comment. All of my fields only show view controls. I suspect that it's due to the fact that I don't have a PowerApps Plan 1 or 2. It would be great if someone can confirm.

 

Thanks,

Anton

Pstork1
Dual Super User
Dual Super User

Did you create an Identity field (Primary Key) in the SQL database when you created it?  That's a requirement for posting back to SQL from Power Apps.  Without an Identity field the connection will be viewed as Read Only.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @Pstork1 ,

 

Thanks for the tip. I can see edit controls in the form now for all other fields except the primary key field. It only shows a 'view text' control. Any thoughts? Thanks in advance.

 

Cheers,

Anton

Hi @Pstork1 

 

Please ignore my previous comment. It turned out that PowerApps cannot edit GUIDs yet. 

 

Thanks,

Anton

What do you mean by GUIDs? I’m getting a bit concerned because the app where I am experience the same view only issue you described was an app that Powerapps made automatically for me after I selected for it to build everything in connection to the out of the box Contacts entity.  I agree with you, Anton, the field that is appearing view only is my primary field and I’m not sure what solution exists based on the discussion in this thread. Perhaps I am misunderstanding what is apparent to others. Thanks to anyone who might be able to guide me further on this.

Hi @GeraldDahl ,

 

The data type of my primary key was guid/unique identifier. You can learn about guids here if you don't know about them.

As a workaround, I changed the data type of my primary key field to text and now I'm able to edit the field in PowerApps.

 

Assuming you have the same problem as mine, you might want to create a model-driven app instead of a canvas app.

Hope this helps.

 

Thanks,

Anton

Its not that its a GUID.  Its because its the Primary Key.  In general you can't change a Primary Key in SQL whether you are in Power Apps or not.  When editing a record the Primary Key is always ReadOnly.  For a SQL identity column its also normally auto generated.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,799)