Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Draft of Infopath form form library

Status
Not open for further replies.

Thant

Technical User
Dec 31, 2007
103
US
Greetings,
Let me try and set this up:
I have a complex Infopath form built as a SharePoint content type. There are two libraries which we will call Main Submit and Draft Submit.
I have built buttons and logic(There is a client requirement for No Code in the form) that will allow a user to save to the Draft Submit library, then come back, fill out the rest of the form and then send it to the Submit Library. Here a complex ( 150+ comments)approval workflow fires.
My problem is this I need a way preferably either in InfoPath or SPD 2010 to delete the draft copy of the form in the draft library ONLY after it has been submitted to the Main. I have a submit action set to set a fields value to SubmitDraft = True but because it is sending it to a different library the Draft library does not pick up that field. I have tried similar logic on the Main library again with no success.
I would appreciate any ideas on how to solve this
Thanks

Anything worth doing is worth messing up at least 5 times before you get it right!
 
why are you moving the form to different libraries?

...
In your Submit library, create a column called DraftID.
When you copy the Form from Draft to Submit (workflow), write the ID of the Draft form to the Submit DraftID column.

Create a workflow in the Submit library to delete the form from Draft based on the ID in DraftID.


Basically, you need a unique "ID" to delete the form from Draft.
If Title is always unique, you can use that to query and delete from another library.

 
Ehaze,

Thanks this is actually what I did. The Project title was a unique field so I built a workflow that goes in and compares the project title in the Draft and Submit Lbrary and if they are the same it deletes the draft.

The reason we are moving them to seperate libraries is so that the people working on the form have a seperate location to work on their drafts that will not fire the main workflow.
The main workflow is a seven layer approval process that has logic for resubmissions and holds, differing views based on who you are etc. Its very complex and it took a long time to get right so I wanted no chance of it firing under the wrong conditions.
Actually moving them to the draft and submit library wasnt hard. I just created a button called draft and built a data connection to the draft library and my submit button (on the form itself) has a data connection to the main library.

Thanks again for your reply

Anything worth doing is worth messing up at least 5 times before you get it right!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top