cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GoBlueByrd
Advocate II
Advocate II

EditForm is Creating New Item

Hello .. new to PowerApps and having an odd issue.  When I am trying to EDIT a record "SubmitForm(FormEditCase)", on submit it is creating a NEW record.  Any advice would be appreciated.

 

Thanks..

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

I found the issue .. I had to add in a field for "ID" that is just for reference.

Once I added that field .. Submitform(Editform) modified the Sharepoint Item rather than creating a new one.

View solution in original post

17 REPLIES 17
v-monli-msft
Community Support
Community Support

Hi @GoBlueByrd,

 

This is the expected behavior that after you submit the content in editform it will create a new item/record to the DisplayForm(data source also). This is what editform used for. 

 

For your reference:

https://powerapps.microsoft.com/en-us/tutorials/function-form/

https://powerapps.microsoft.com/en-us/tutorials/control-form-detail/

 

Regards,

Mona

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

Per the link (instructions shown below) .. using SubmitForm when in EditForm mode, the record should editted/modified, not create a new record, which is happening to me.

 

I've searched thru all my settings and can not find why records are being created when they should be modified.

 

Any help to what I might be missing to look for?

 

Thanks ..

 

 

EditForm

The EditForm function changes the Form control's mode to FormMode.Edit. In this mode, the contents of the Form control's Item property are used to populate the form. If the SubmitForm function runs when the form is in this mode, a record is changed, not created. FormMode.Edit is the default for the Form control.

Anonymous
Not applicable

Hi @GoBlueByrd

 

Can you post some screenshot of the form? What is the Item property set to? What is the DefaultMode of the form? How do you access the form? Do you have NewForm(), ResetForm() or EditForm() somewhere?

Hopefully this helps ..

 

Below is the main gallery screen with a filtered list.

I've captured the ITEMS command.

 

Gallery ItemsGallery Items

 

The gallery item button is programmed to go to the Detail Screen

 

 

Gallery Navigate On SelectGallery Navigate On Select

 

The details screen populates fine .. I've captured the DATASOURCE command.

 

 

Detail View SourceDetail View Source

 

The EDIT PROJECT button is programmed as seen below

Note that I am using EditForm command, which should edit the Sharepoint list entry, not create a new one.

 

Detail View Navigate to Edit FormDetail View Navigate to Edit Form

 

The EditForm populates correctly with the fields.

 

 

Edit Form Data SourceEdit Form Data Source

 

Changes are made to the fields and the SAVE button command is shown below, which is SUBMITFORM.

Expectation is that the list item is modified, however, a new list item is being created.

 

 

Edit Form Submit CommandEdit Form Submit Command

 

Thanks for any help that can be provided.

 

Hopefully this helps ..

 

Below is the main gallery screen with a filtered list.

I've captured the ITEMS command.

 

Gallery ItemsGallery Items

 

The gallery item button is programmed to go to the Detail Screen

 

 

Gallery Navigate On SelectGallery Navigate On Select

 

The details screen populates fine .. I've captured the DATASOURCE command.

 

 

Detail View SourceDetail View Source

 

The EDIT PROJECT button is programmed as seen below

Note that I am using EditForm command, which should edit the Sharepoint list entry, not create a new one.

 

Detail View Navigate to Edit FormDetail View Navigate to Edit Form

 

The EditForm populates correctly with the fields.

 

 

Edit Form Data SourceEdit Form Data Source

 

Changes are made to the fields and the SAVE button command is shown below, which is SUBMITFORM.

Expectation is that the list item is modified, however, a new list item is being created.

 

 

Edit Form Submit CommandEdit Form Submit Command

 

Thanks for any help that can be provided.

 

I found the issue .. I had to add in a field for "ID" that is just for reference.

Once I added that field .. Submitform(Editform) modified the Sharepoint Item rather than creating a new one.

Where did you add the field?  Can you provide a little more detail?

Where did you add the ID field? I am having the same problem. Can you please provide a more detailed instruction? 😞

Okay, this is how it works for me. I set the Items property of the form to Gallery3.Selected, because I get to the form from another list. I think you need to play around with the Items property of the form in order to correctly select the existing record. Hope it helps.

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 (3,749)