cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Advocate II
Advocate II

Re: EditForm is Creating New Item

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

Re: EditForm is Creating New Item

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.
Highlighted
Advocate II
Advocate II

Re: EditForm is Creating New Item

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.

Highlighted
Anonymous
Not applicable

Re: EditForm is Creating New Item

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?

Highlighted
Advocate II
Advocate II

Re: EditForm is Creating New Item

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.

 

Highlighted
Advocate II
Advocate II

Re: EditForm is Creating New Item

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.

 

Highlighted
Advocate II
Advocate II

Re: EditForm is Creating New Item

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

Highlighted
Helper I
Helper I

Re: EditForm is Creating New Item

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

Highlighted
Frequent Visitor

Re: EditForm is Creating New Item

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

Highlighted
Frequent Visitor

Re: EditForm is Creating New Item

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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

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