Infopath 2007 with SharePoint Drafts

So I have a SharePoint site with an infopath document library. I have a workflow with all intents and purposes tracks a form through an approval type process. They would like for there to be a save option, which would not start the workflow. This operation would simply save the form in the document library within sharepoint. This form can then be completed at a later time and submitted.

So my question is this, is there a non-code based solution to this? If so, does that solution work with the fact that I do have controls which are required ("cannot be blank")? If there are only code based solutions do you know of a good tutorial for this? I found a couple code based solutions out there, one didn't take into account required fields and the other just saved an xml file to the document library which did not behave like an infopath form.
SeditioAsked:
Who is Participating?
 
Clay FoxConnect With a Mentor Director of Business IntegrationCommented:
If you create a field that stores the "State" of the form, and update this field on the final submit and promote it. You could have draft, submitted, reviewed, whatever.
Then I believe your workflow could look at this value conditionally and react accordingly.  I am not a SP workflow expert so I am not sure.

I have done lots of workflows, codelessly, within InfoPath itself and have used a similar approach successfully.
0
 
SeditioAuthor Commented:
I like the solution and it works how I want it to.

Any idea on how to deal with the required fields? With this solution I still cannot save the "draft" unless all the required fields are filled out.
0
 
Clay FoxConnect With a Mentor Director of Business IntegrationCommented:
Yah you have to trun off the default from validation and do it your self within InfoPath with rules on the submit button.

I would do it this way.

For fields that are required put a default in your form. Make it an allowable value but one that would not or should not be a normal value.  So on a numeric value maybe 0 or 99999 or something.  That makes it easy to filter drafts out or tell if it has been updated by the user yet.

Then you can save it in a draft state to the user but complete enough for the submit.

I would also make the "save" a button and disable the save in the menu so you can mandate the file naming etc, if you have not already done so.
0
 
StevenMulkerrinsCommented:
I second Clayfox's suggestion, I've used this approach very successfully. With a little sneakyness it also allows you to handle required fields. The trick is to not use the "Can not be blank" check box to make the field required. Instead use 'Data Validation', you can add a condition that has two rules, something like

MyField is blank AND
State is not equal to Draft

You then make sure to set the State field in your different save/submit/etc buttons. If they are saving a draft, the field will pass validation even if it's blank, if the state is not draft, i.e. if it's being submitted etc then it will not pass validation unless it has a value preventing the form from being saved. It's a little more longwinded than just checking 'not blank' box, but it works very well.
0
 
SeditioAuthor Commented:
Thanks! Works great, now to just update all those fields...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.