locked
Can InfoPath Submit to the library that contains the template without hardcoding the library name? RRS feed

  • Question

  • Hi,

    I have to specify the form library name in my form’s submitting data connection. That means the form library address is hardcoded in the form.

    Is there any way not to specify the form library address and InfoPath automatically submit the form’s xml data to wherever the form was opened from?

    Thank you,

    Thursday, April 26, 2012 2:13 AM

Answers

  • Hi Allan49,

    Unfortunately, no, the code sample is for browser templates, as it obtains the location it was opened from via the InputParameters of the URL.

    I am not sure of a way to do this in the InfoPath 2007 client.  Someone else may have some thoughts.

    In InfoPath 2010, I know there is the built in function, "SharePointListUrl()", which would accomplish exactly what you want to do.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Regards,
    Ian Kavanagh
    Microsoft Online Community Support

    • Marked as answer by Allan48 Saturday, April 28, 2012 9:33 PM
    Thursday, April 26, 2012 4:06 PM

All replies

  • Hi Allan49,

    Are you opening the InfoPath template in the browser?  If so, this should help you out:

    http://blogs.msdn.com/b/infopath/archive/2006/11/08/submitting-to-this-document-library.aspx

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Regards,
    Ian Kavanagh
    Microsoft Online Community Support

    Thursday, April 26, 2012 3:34 PM
  • Hi Ian,

    Forms server is not available, so all of the forms are being opened in the actual InfoPath. Does the approach you mentioned work on forms being opened in InfoPath itself?

    Thank you,

    Thursday, April 26, 2012 3:50 PM
  • Hi Allan49,

    Unfortunately, no, the code sample is for browser templates, as it obtains the location it was opened from via the InputParameters of the URL.

    I am not sure of a way to do this in the InfoPath 2007 client.  Someone else may have some thoughts.

    In InfoPath 2010, I know there is the built in function, "SharePointListUrl()", which would accomplish exactly what you want to do.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Regards,
    Ian Kavanagh
    Microsoft Online Community Support

    • Marked as answer by Allan48 Saturday, April 28, 2012 9:33 PM
    Thursday, April 26, 2012 4:06 PM