InfoPath save and close button?

I've seen this done so I know there is a way to do it, just haven't found the solution

I want to create a browser-based form that has a button to be able to save (not submit, just save), and close the form. InfoPath seems to lock out the option to add a rule to close the form if you want to save it, and there is no rule to save, only submit.

January 10th, 2013 4:57pm

Hi,

You can a Button and Rename it as Save and write the rules you want.

If you want to change the button configuration you can go to option and change button visibility.

And again if you want to disable the submit button; Go to Data Tab -> Submit Options -> untick Allow Users to submit this form 

Thanks!

Free Windows Admin Tool Kit Click here and download it now
January 11th, 2013 4:28am

Submit actually does save the form, so what are you trying to avoid by wanting it to save and not submit?  Is it just that you don't want the validation to happen?  If so, here's a blog post that may help you:

InfoPath Save Draft Form Functionality A Better Way

January 11th, 2013 5:02am

Thank you for the responses. Neither one quite provide the solution I want however. I recently realized that there is a different between an InfoPath form library, and an InfoPath List. A list will allow you to use the submit rule to basically save the form. So I can just submit and close and it works just like I was asking for.

However, I am working with an InfoPath form library, not a list. So using the submit feature, it will give me an error that the file name already exists. I can choose to overwrite the file which works, but for some of these forms I have workflows that initiate when the form is created. So I would assume overwriting would be creating a new form and initiating the workflow

Free Windows Admin Tool Kit Click here and download it now
January 11th, 2013 6:33pm

HI,

When you submitting the the infoPath form , if it is the same file name it is asking for override. But you can set random or unique name to the form which will not ask for override.

Normally what i do is im setting current time stamp as the form name. So it will be unique and will not override other existing forms.

If you want you can add a prefix to form name as well (concat("Form-",now()))

January 13th, 2013 9:01am

Thanks for the response, but I am not wanting to submit another file. I want to save the current one. If I save another list item then I have the same problem I just mentioned that my workflows for creating a new item will kickoff, and I'll still have my old list item in the library as well, so I'll end up having duplicates
Free Windows Admin Tool Kit Click here and download it now
January 13th, 2013 7:02pm

You need to just add a button, put an action rule against it to submit using a data connection, and then close.  You need to amend your workflow so that it only runs when an item is created, that way when you modify the item by re-saving it then it wont kick off the workflow.
January 14th, 2013 3:28pm

This does work

Sorry all, using this as a form library you have to check box the "overwrite" feature to overwrite a file with the same file name. I thought this would essentially be creating a new file, and would kick off workflows that happened on file creation, but it doesn't. This option works just fine, thanks all!

Free Windows Admin Tool Kit Click here and download it now
January 15th, 2013 12:05am

Here's what I do as a standard practice for the file naming convention.  I do not use "now()" because then each time you edited the same form, it would create a new file.  You only want one file per form, right?

  1. Create a field called "FormCreated", and set its default value to now().  UNcheck the box so that the value is never recalculated.
  2. In your submit connection, use this "FormCreated" field as your file name, and DO check the box to allow overwrite.

As far as the workflow, if it's set to run on change, then when you use the submit action, the workflow will run.

January 15th, 2013 3:43am

This is a simple and clean solution, THANK you very much for sharing

Free Windows Admin Tool Kit Click here and download it now
March 20th, 2014 11:58pm

Brilliant!!!

I was throwing the towel and then, saw your post.

THANK YOU!!!

May 21st, 2015 7:11pm

hello there; help

Free Windows Admin Tool Kit Click here and download it now
June 13th, 2015 3:08pm

hello laura; I had a big reply but unfortunately as it often is with this things; MS would not let me respond

please contact me

thanks

June 13th, 2015 3:11pm


Hello Laura; I have followed you awesome example on how to implement the save draft button on an infopath form. unfortunately, it does not work on 2010 or office 365 or 2013.... Here's the problems:

1) doing it your way assumes that all the fields are not declared as required
2) the submit button does not SUBMIT anything as the data/form is not saved
3) the Save Draft button ends up with a WARNING/correlation error when used and does not save the form 
There are images but I cant include them.
Laura, I kid you not when I tell you I have done your example 7 times and followed each step meticulously to make sure I did not miss anything. Here is the log of the last run I had with this:
step 12	move this rule up above the submit rule that was already there.
	problems: there is not submit  rule in this place.
		  where is that coming from
		  how is that rule step created and who creates it?
		
		  also the submit button now appears in the ribbon up above the form when
		  the form is being filled, it wasn't there before
13: OK
14: OK:	created the three rule steps: set field to draft, submit using submit to library, 
	close form
	problem: I get a warning with a correlation error and the form is not saved, stored
15: OK
16: OK:	FormStatus changed to calculated value
17: OK:	FormStatus value changed to New
18: OK: new Load form action rule Draft created
19: OK: set condtion to FormStatus is equal to Draft
20: OK: added set variable; set FormStatus value to New
21: OK: selected the FirstName fields; created a new validation rule called required; 
22: OK: added two conditions; FirstName is blank and FormStatus is not equal to Draft
23: OK: typed "this field is requred" on the screenTip box
24: OK: copied the rule;and pasted it, my mistake; exited the form and re-opened 
	to remove the duplicate rules created by my pasting the rule
25: OK: selected the LastName field and pasted the required validation rule in here
26: OK:	disabled the save & save as options
27: OK:	selected the savs draft button; created a new formatting rule; added the
	conditions: FormStatus is not equal to Draft and FormStatus is not equal to New
	checked the "hide this control and called the rule "hidden
28: OK:	published the form
29: not OK: FILLED THE FORM, TESTED IT AND BOOM THE ERROR AGAIN....
Anywho: I really need a solution to this for my job as it is a requirement for a BIG form for a government agency. Bought your book and have taken another course informs and nothing. My question is: WHY does MS do things like this, they have the save button and it works like a charm but there is no documentation on how to do the same thing. I mean, saving a form is a BIG deal where I work and I'm sure it's in a lot of places, so what's the big deal that they can do it but us the paying customers...???? :( :( :( :( Regards

Free Windows Admin Tool Kit Click here and download it now
June 13th, 2015 3:12pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics