How to change the form name, which is to be saved as? - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

How to change the form name, which is to be saved as?

Last post 01-21-2010 02:38 PM by imstac. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 09-27-2007 09:10 PM

    • Jeff.Wang
    • Not Ranked
      Male
    • Joined on 06-19-2007
    • Sydney, Australia
    • Posts 13

    How to change the form name, which is to be saved as?

    Is it possible to change the form name, e.g. from "Form1.xml" to "Proposal 001.xml", sometime when user is filling the form? So that when user finishes filling, and tries to save the form, the name in the save dialog will be the new name, rather than the default one.

    I need this to make sure the file name follows some rules, rather than free text anything written by user.

    thanks.

    Jeff Wang
    Sydney Australia.
  • 09-27-2007 11:09 PM In reply to

    Re: How to change the form name, which is to be saved as?

    Hi Jeff,

    When you are creating the data connection to submit the form to the sharepoint library,  On the third dialog of the wizard when you specify the url for the SharePoint Library, there is a second text box called Filename, you can put an xpath expression in here that uses some of the fields in the form to create an unique name. You can use the concat function to concatinate multiple fields together
    e.g. concat("Proposal", <field1>, <field2>)

    You can also provide an OnSubmit or OnSave handler and set the name of the file in code.   There is an example in "Developing Solutions with Microsoft INFOPATH" by Patrick Halstead and others.  Check out chapter 10, Uniquely Naming the Form.

    Hope this helps.

    Stephanie

    Stephanie Cantwell / Test Manager
    Qdabra® Software / Streamline data gathering to turn process into knowledge

    Filed under:
  • 10-01-2007 06:57 PM In reply to

    • Jeff.Wang
    • Not Ranked
      Male
    • Joined on 06-19-2007
    • Sydney, Australia
    • Posts 13

    Re: How to change the form name, which is to be saved as?

    Hi, Stephanie

    Thanks for your helpful reply and I found also we can use Javascript to this, like

    XDocument.UI.SetSaveAsDialogFileName("Status Report.xml");

     

     
    Jeff Wang
    Sydney Australia.
  • 10-02-2007 12:13 AM In reply to

    Re: How to change the form name, which is to be saved as?

    Kalyan G Reddy
    Infopath MVP 2007 and 2008
  • 10-02-2007 10:35 PM In reply to

    Re: How to change the form name, which is to be saved as?

    Hi Jeff,

    Thanks for sharing that info.

    Regards,

    Stephanie

    Stephanie Cantwell / Test Manager
    Qdabra® Software / Streamline data gathering to turn process into knowledge

  • 01-21-2010 02:38 PM In reply to

    • imstac
    • Top 200 Contributor
      Female
    • Joined on 01-13-2010
    • Austin, TX
    • Posts 59

    Re: How to change the form name, which is to be saved as?

    Stephanie,

    To which wizard are you referring?  The Publish function in Infopath?

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