Infopath 2007 with SharePoint Drafts

Posted on 2009-12-17
Last Modified: 2012-05-08
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.
Question by:Seditio
    LVL 28

    Accepted Solution

    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.

    Author Comment

    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.
    LVL 28

    Assisted Solution

    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.
    LVL 7

    Expert Comment

    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.

    Author Comment

    Thanks! Works great, now to just update all those fields...

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
    The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now