SaveAs - InfoPath Dev
in

InfoPath Dev

SaveAs

Last post 05-28-2008 10:33 AM by Albert. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 01-30-2008 01:47 PM

    • marpa1
    • Not Ranked
    • Joined on 01-30-2008
    • Posts 6

    SaveAs

    I am new to this site and InfoPath. This is my problem i want to add a button on a form and when clicked it needs to do a SaveAs. Any help wolud be great. Thanks

  • 01-30-2008 02:57 PM In reply to

    Welcome.

    If you want a true Save As then the user can use the toolbar or you could potentially trigger the standard Save As from code.

    You may mean how do you have a button save the form and give it a specific name?

    Standard practice is to use a submit data connection to either SharePoint or a file share and then create a standardized file naming scheme by concatenating fields from the form. This makes sure the forms are always stored in the right location and with the standard name and the user just clicks save.

  • 01-31-2008 05:36 AM In reply to

    • marpa1
    • Not Ranked
    • Joined on 01-30-2008
    • Posts 6

    The form is an evaluation for all the managers. They will be saving them in there user folders. Some of them are not the brightest when it comes to computers. So what i want to do is have them click a button that will open the SaveAs dialog box. Thanks for the help.

  • 01-31-2008 10:49 AM In reply to

    Exactly, that is why you should setup a submit data connection.  Set the location (network folder - so everyone knows where to look) or maybe My Documents) and construct a filenaming scheme.  Maybe concat(managername, "-" date) or something like that. They click save and they are done. 

  • 01-31-2008 11:41 AM In reply to

    • marpa1
    • Not Ranked
    • Joined on 01-30-2008
    • Posts 6

    Could you give me some directions on how to do that. Thanks for all your help.

  • 02-11-2008 01:18 PM In reply to

    • marpa1
    • Not Ranked
    • Joined on 01-30-2008
    • Posts 6

    Please help someone.

     

     

    Thanks

  • 05-28-2008 08:27 AM In reply to

    • mightytook
    • Not Ranked
    • Joined on 05-28-2008
    • Arlington, VA
    • Posts 8

    I have a little bit of a different problem.

    We have multiple Form Libraries that are using the same form template (when a change is made, the form is published out to multiple form libraries ... one library in each region's SP site). Everything looks to work okay, but the filenaming conventions are inconsistent. Since there's multiple locations where the file is saved, I would like to determine the filename, but not really worry about the file location ... The users are trained to go to the Form Library and click New, fill out the form, and then click Save so they can deal with that. I can't figure out how to do this through the data connections to say "wherever you want to save it is fine, but how about using this filename". My preference is to just have the File Save dialog box appears (as by default it has the correct location) and override the Name field with a default value. Ideas?

  • 05-28-2008 10:33 AM In reply to

    • Albert
    • Top 500 Contributor
    • Joined on 04-03-2008
    • The Netherlands
    • Posts 32

    Using jscript you could do something like this, use :

    function XDocument::OnSaveRequest(eventObj)
    {
     try
     {
      //XDocument.UI.SetSaveAsDialogLocation("\\my\form\directory");
      XDocument.UI.SetSaveAsDialogFileName("myForm");
      eventObj.IsCancelled = eventObj.PerformSaveOperation();
      eventObj.ReturnStatus = true;
     } 
     catch(e)
     {
      XDocument.UI.Alert("Error at OnSaveRequest: " + e.message);
      eventObj.ReturnStatus = false;
     }  
    }

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