Answered by:
Infopath form validation error on submit to a SharePoint library

Question
-
Hi, I have a fairly lengthy form with lots of fields and rules that will not submit to a SharePoint (MOSS 2007) form library.
I get the following error on submit:
"Infopath cannot submit the form because it contains validation errors that are not in the current view. Errors are marked with either a red asterisk (required fields) or a red, dashed border (invalid values).
If you cannot find an error in other views, there might be a problem with the form's design."
Clicking on the "Show Details" button gives this information:
"The form contains the following errors:
Field or group: #text
Error: No exact match was found.Field or group: #text
Error: No exact match was found."There are not any fields or groups on my form called "text"
Interestingly, if I save the form locally (e.g. save it on my desktop instead of submitting it to the library) and then reopen it and try submitting again, it then submits to the form library successfully.
I have tried recreating the submit connection, have also tried publishing the form to a new form library and get the same errors.
I am using Infopath 2010, however the form is in Infopath Filler 2007 compatibility mode as my users were all using Infopath 2007. They have just recently been upgraded to Office 2010 including Infopath 2010 (the issue was occuring before this) but we are still experiencing this issue. I have also tried using the form in Infopath Filler compatibility mode and upgraded all the data connections to 2010 version however get the exact same error. I have also tried publishing the form to a SharePoint 2010 RTM installation but get the same error.
Answers
-
The issue I had seemed to be with the contact selector field - I was trying to set a default value in there but I was not setting all three fields - DisplayName, AccountId and AccountType. All three must be set for it to resolve properly and allow submission of the form. If you only set one field (e.g. AccountId) it will look OK, and will even let you click the resolve button and appears to resolve the username, but it won't submit.
- Marked as answer by kylierichardson Wednesday, December 8, 2010 4:18 AM
All replies
-
Sounds like you have some orphaned controls or field references in a view other than the one that you submit from. It could be stuff that only shows up in the manifest, so I'd recommend using "save as source files" to break open the template, then edit the manifest.xsf in notepad and look for those references.
SharePoint Architect || Microsoft MVP || My Blog- Proposed as answer by kristy_russman Monday, June 11, 2018 4:23 PM
-
-
Never seen an error like that with a field reference that has a # sign at the beginning. That's not a valid character for a field name, so it is strange. I'd have to look at the template to have a chance at troubleshooting it. If you want to send it to me, then head to my Blog and use my Contact page.
SharePoint Architect || Microsoft MVP || My Blog -
-
-
The issue I had seemed to be with the contact selector field - I was trying to set a default value in there but I was not setting all three fields - DisplayName, AccountId and AccountType. All three must be set for it to resolve properly and allow submission of the form. If you only set one field (e.g. AccountId) it will look OK, and will even let you click the resolve button and appears to resolve the username, but it won't submit.
- Marked as answer by kylierichardson Wednesday, December 8, 2010 4:18 AM
-
Try this article for setting default in Display. Says to only set DisplayName and AccountID with UserName() default. Leave AccountType default blank.
-
Set AccountType to User. I do this on many of my 2007 forms. Also, userName() doesn't go in AccountId. It should be domain name, which is in the format of domain\username. You can concatenate your known domain with the userName() value or retrieve the AccountName value from the UserProfileService, which is where you'll get the DisplayName (aka PreferredName).
SharePoint Architect || Microsoft MVP || My Blog
Planet Technologies || SharePoint Task Force -
Hi
Same issue.. saved my life.. silly thing is not working in infopath .. strange.. to pre-populate i too used the same username() on from load
Thank you so much,work around would be is only bring user name from user profile service?? or is there any other workaround also
Guruprasad Marathe
-
-