none
InfoPath XSN -> to XML file in Forms Library RRS feed

  • Question

  • I created an InfoPath form (.xsn) and published it to an already existing Forms Library. When I do a 'New' in the forms library, the form template pops up. There are a couple of things I don't understand about this.

    1. The form that pops up appears to be an .xml file but not an .xsn file. How is it that I publish an .xsn file but SharePoint shows it as an .xml file? I know an xsn file 'is' an xml file but still, why has the extension changed?
    2. When I do a 'New', fill in the data, then Submit, it will submit the form to the libary, but always with the same name. Then when I get ready to close the form, it wants to know if I want to save it to the library. So, what should really happen here? I would think I would need to just save it to the form but I guess the submit does the posting of the data. If it is going to automatically submit the form, how can you make it have a unique name?

    Thanks!
    EM
    • Moved by David Mann [MVP] Monday, August 10, 2009 1:59 AM Not a WF question (From:SharePoint - Workflow)
    Sunday, August 9, 2009 6:18 PM

Answers

  • Etowah, this is simple stuff.  If you use the close action on your submit button, then it will close.  If it's a rich client form, then InfoPath won't close, but the form you're filling out will close.  If it's a browser form, then it will close and take you back to the form library (or to whatever URL is specified in the &Source attribute of the Forms Services URL).

    You definitely do not need code.  What you should probably do is not use the bulit-in submit nor the built-in save, but rather create a submit data connection and put it in a rule on a custom button on the form itself.  You should also be sure it submits with a unique, automated ID like in my blog post:

  • InfoPath – Auto-Generating Filenames
  • Definitely no code needed.


    SharePoint Architect || My Blog
  • Marked as answer by Lu Zou-MSFT Tuesday, August 11, 2009 10:34 AM
  • Marked as answer by Lu Zou-MSFT Tuesday, August 11, 2009 10:34 AM
Monday, August 10, 2009 4:02 AM

All replies

  • If you did a publish, and not just a save or upload, to the library then the XSN file should be in the Forms folder of the library. This folder is hidden when using a browser but can be seen using SharePoint Designer, or the Windows Explorer option in the Actions menu.

    When you click new it opens the template (XSN) so you can fill out the form. When you save back to the library it will only save the XML data. After a save you be able to mouse over the icon of the saved file in the library and see that the file extension is XML, not XSN.

    This is the same as a Word template (.DOT or .DOTX). When you save a document created from a template it saves a Word document (.DOC or .DOCX).


    > how can you make it have a unique name?

    In InfoPath customize the Submit option. (Tools, Submit options)

    Mike Smith TechTrainingNotes.blogspot.com
    Sunday, August 9, 2009 7:55 PM
  • In regard to changing the name of the form, I currently has a rule that submits the data and is then supposed to close the form. I have noticed however that the form does not actually close.

    Would I need to add code behind or some sort of macro to discover the name of the file and then use that name in the code behind? Any samples of this?

    Thanks!
    EM
    Sunday, August 9, 2009 8:29 PM
  • Etowah, this is simple stuff.  If you use the close action on your submit button, then it will close.  If it's a rich client form, then InfoPath won't close, but the form you're filling out will close.  If it's a browser form, then it will close and take you back to the form library (or to whatever URL is specified in the &Source attribute of the Forms Services URL).

    You definitely do not need code.  What you should probably do is not use the bulit-in submit nor the built-in save, but rather create a submit data connection and put it in a rule on a custom button on the form itself.  You should also be sure it submits with a unique, automated ID like in my blog post:

  • InfoPath – Auto-Generating Filenames
  • Definitely no code needed.


    SharePoint Architect || My Blog
  • Marked as answer by Lu Zou-MSFT Tuesday, August 11, 2009 10:34 AM
  • Marked as answer by Lu Zou-MSFT Tuesday, August 11, 2009 10:34 AM
Monday, August 10, 2009 4:02 AM