Sending form to SharePoint fails - InfoPath Dev
in

InfoPath Dev

Sending form to SharePoint fails

Last post 03-24-2011 09:09 AM by BJ Johnston. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 03-18-2011 03:16 AM

    • Joern
    • Top 150 Contributor
    • Joined on 09-28-2010
    • Posts 79

    Sending form to SharePoint fails

    Hello All,

    I have a form in which the user should choose his department from a dropdown-field called 'Center'. Then, he's filling out the form. In the end, he should click on a button to send the form to SharePoint.

    I've created a data connection to SharePoint and said that the filename should be the field 'Center' and I already allot the data connection to the button.

    But everytime, I click on the button I receive a message like: 'The form cannot be sent. A mistake is occured while sending the form.' When I take a look to the details I receive the hint: 'File name is possibly defined by a value within the form...'.

    I mean, what is this message trying to say?! Sure, the filename is defined by a field within the form. That is exactly what I want to. Why does the form avoid this?

    Thank you very much for your support in advance. I appreciate every single advice. This problem is driving me nuts.

    Greets from Germany. 

  • 03-18-2011 08:18 AM In reply to

    Re: Sending form to SharePoint fails

    Are you sure the field that is being used for the filename has data in it? InfoPath won't be able to submit the XML without a name...

    I'm sure you've done this, but triple check -- walk through the submit data connection and verify that you have used the Center field for your filename, and verify that your dropdown is bound to the same field. Perhaps set that Center field to "cannot be blank". You can also post a copy of your form here -- under "Options" you can attach a file. I'd be happy to take a quick look at it....

    Hilary Stoupa

  • 03-23-2011 05:53 AM In reply to

    • Joern
    • Top 150 Contributor
    • Joined on 09-28-2010
    • Posts 79

    Re: Sending form to SharePoint fails

    Thanks for your response.

    Unfortunately, I'm not allowed to post the form due to sensitive data.

    But I'll explain more precisely:

    1. Start screen:
      • The user chooses his center via a dropdown-field called 'centerchoice' that is populated by a .xml-file.
        • After the user made his choice, the dropdown-field 'centerchoice' sets its value to the field 'Center' which I put in 8 other views.
      •  Afterwards, the user is asked to confirm his choice by clicking a button.
        • By clicking this button the form is changing its view (depending on what center the user have chosen). Each center has its own view.
    2. Now, the user is seeing the view corrsponding to his choice of center.
      • The view has the field 'Center' that is populated with the center the user have chosen via the dropdown-field 'centerchoice' in the start screen. The field 'Center' his write-protected.
      • The user is asked to do several data input (The view does not change).
      • In the end, the user is asked to submit his filled-out form to SharePoint via clicking on a 'Submit'-button. This 'submit'-button has the action 'Submit' with the data connection 'SharePoint.'
    3. The data connection 'Share Point'.
      • In the data connection 'Share Point' the file-name is determined by the field 'Center'.
    4. When clicking the 'Submit'-button I receive the message like: 'The form cannot be sent. A mistake is occured while sending the form.' When I take a look to the details I receive the hint: 'File name is possibly defined by a value within the form...'.

    Any idea where the gremlins are inside screwing things up?

    Thank you very much in advance and pardon my sometimes lousy English.

  • 03-23-2011 08:37 AM In reply to

    Re: Sending form to SharePoint fails

    Joern,

    Have you looked at your Submit Data Connection File Name field?  If your file name is being taken from a field that will have many entries with the same name, Center for instance, then there will be an error unless you allow the overwrite of the file.  You probably don't want to overwrite existing files, so you might try adding a date function to your File Name field in the data connection.

    Hope this helps.

  • 03-24-2011 05:27 AM In reply to

    • Joern
    • Top 150 Contributor
    • Joined on 09-28-2010
    • Posts 79

    Re: Sending form to SharePoint fails

    Hello BJ Johnston,

     thank you for your response.

    I'm not sure, if I got you right. Do you mean the issue occured because it's a problem when there will be more than one file on the SharePoint with the same filename?

    For instance:

    In February, user A filled out his form. He selected 'Center A' from the dropdown-field 'Center' and the month 'February' from the field 'Month'. Then he sent his form to the SharePoint and there it is stored with the filename 'Center A'.

    Then, in March, it is impossible to send the form because it cannot be saved on SharePoint because there already exists a form with the filename 'Center A', namely the one from February.

    Got you right?

    Thank you very much in advance.

     

  • 03-24-2011 09:09 AM In reply to

    Re: Sending form to SharePoint fails

    Exactly, the same would apply if you had more than one person submitting to the same center.  For instance, if your file name if based on the center and the month and Mr. Smith enters his form, when Mr. Jones comes along to enter his form to the same center for the same month, he will be unable to do so.

    My suggestion would be to add a function to the file name field that would add the date and possibly the time to avoid the issue of being unable to save the files.

    Hope this helps.  Let me know.

Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.