I have a custom InfoPath form for at Sharepoint list. One of our users tried to create a new item and attach a document which had a very long file name.

When the user clicked the save button an error occurred as expected, saying the file name was to long. The user tried a number of times and finally managed to get the element created and the form closed.

But it turned out that an element was created each time the user had clicked save.

How can I prevent this from happening. The form is not supposed to create an element when there is an error.

We are using SP2013 and InfoPath 2013.

1 Answer 1


This is happening because the attachment control is not mandatory. If you want to keep it that way then you need to put a validation in the attachment tab, if there is an error you should disable the Submit Button.

Second thing, In the form setting select the option to create a new version of file instead of new file on each update.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.