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.

View solution in original post

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

uyentpk
Frequent Visitor

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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,682)