Infopath 2007 with SharePoint Drafts

Posted on 2009-12-17
Medium Priority
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
  • 2
  • 2
LVL 28

Accepted Solution

clayfox earned 2000 total points
ID: 26074363
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

ID: 26075329
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

clayfox earned 2000 total points
ID: 26075780
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.

Expert Comment

ID: 26075849
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

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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In case you ever have to remove a faulty web part from a page , add the following to the end of the page url ?contents=1
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

850 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