Here we will discuss how we can solve the below error which comes while submiting a InfoPath customized form in SharePoint online.
Recently we developed a InfoPath form and we were saving to a form library in SharePoint online. But when we open an item to edit and then try to submit it, it was not allowing me to save the item, it was gaving error like below:
The form cannot be submitted because of an error.
Click OK to resume filling out the form. You may want to check your form data for errors.
The form cannot be submitted to the specified SharePoint document library. The document library already contains a file with the same name. A value in the form may be used to specify the file name. If you know what that value is, modify it and try submitting the form again.
An entry has been added to the Windows event log of the server.
The full error looks like below:
We developed an InfoPath form and we were saving to SharePoint online form library. In that form we were using custom submit button, and saving the data using custom rules to SharePoint online form library. To check the rule associated with a button, select the button and click on “Manage Rules” which is under Home tab in the ribbon.
We were saving the form using a data connection. Click on the “Data” tab and then click on “Data Connections”.
The “Data Connections” tab will show all the data connections used in the form. Select the particular data connection which you are using and then click on “Modify” like below:
Then in the “Data Connection WIzard”, Check the “Allow overwrite if file exists” checkbox like below:
After that as long as you will not change the Name field (which I have used in the fx to use as the file name), it will edit the item rather saving the item.