Save and Continue InfoPath with SharePoint workflow - InfoPath Dev
in

InfoPath Dev

Having trouble finding a blog or post that answers your question? Check out our Custom Search Page

Save and Continue InfoPath with SharePoint workflow

Last post 10-16-2017 04:06 PM by ScottSaari. 12 replies.
Page 1 of 1 (13 items)
Sort Posts: Previous Next
  • 10-12-2017 01:15 PM

    Save and Continue InfoPath with SharePoint workflow

    I am trying to implement a "Save and Continue" functionality in my InfoPath form. The problem is outlined in steps below. 1. On the Save button in InfoPath it sets the value of a hidden field named FileName and saves the file to the document library as UserName + DateTime 2. SharePoint workflow fires off and the first step is to rename the file to FormType (We have 25 forms we are creating so the form type is the form name) + SharePoint ID 3. Workflow saves promoted data Problem is the infopath thinks the filename is UserName + DateTime. I tried to query the document library and grab the new name but the workflow has not renamed the file in time so it returns the UserName + DateTime. Note: I have research the Update Form button and that does not seem to work. The users want to work on this like a word document and save periodically Thanks for any ideas
  • 10-16-2017 11:13 AM In reply to

    Re: Save and Continue InfoPath with SharePoint workflow

    I have a silly question - why can't you just use the "Form Type" for the name to begin with?
    Hilary Stoupa

  • 10-16-2017 11:51 AM In reply to

    Re: Save and Continue InfoPath with SharePoint workflow

    Great question. So these forms will go on to get approved by sometime 7 managers then to a back office team. We want to use the SharePoint ID concatenated with what form they requested. For ease of referring to the form SalesCredit - 101 or UPFA - 102. To ensure it does not update the wrong or someone else form. We looked at creating a random number but do not want really long numbers.
  • 10-16-2017 12:10 PM In reply to

    Re: Save and Continue InfoPath with SharePoint workflow

    Got it. So - is this library heavily used? One way to do this is to query the library right before you submit to return the ID numbers & get the max(ID), then use it in the form name. If the library gets a lot of traffic, you run the chance of having someone else get the same ID tho - both query at the same time before the submit is complete.
    Hilary Stoupa

  • 10-16-2017 12:40 PM In reply to

    Re: Save and Continue InfoPath with SharePoint workflow

    Yes this library will be used by a lot of people. So to eliminate the chance of it overwriting we first save as UserName + DateTime to the library and that fires off the workflow. The first step of the workflow is to grab the FileType + SharePoint ID created when it was first save with the UserName + SharePoint ID. I have a hidden field with the file name that I try to re-querry when they select Save and Continue but it returns the UserName + Date file name because the workflow has not renamed it yet. I tried to create the file in the library OnLoad but people would open the form then close it for a number of reasons like it was the wrong form and then I would have a hundred files that were blank, that required a ton of clean up and overhead. So I have set up a meeting with the business owners to tell them the Save and Continue is not possible tomorrow at 9:30 AM. So now I am just fishing for any ideas to overcome this.
  • 10-16-2017 12:49 PM In reply to

    Re: Save and Continue InfoPath with SharePoint workflow

    How about if Save & Continue is only possible after the first submit? Then, the form's name is updated, they can re-open from the library and continue on their way? Or, perhaps you check for that file name as the first step on your "Save & Continue" - skip it for new forms that haven't been submitted, but for forms that have, you could get the name right before the second submit - that would give the workflow a chance to run, right?
    Hilary Stoupa

  • 10-16-2017 01:27 PM In reply to

    Re: Save and Continue InfoPath with SharePoint workflow

    So I have thought about checking for the name on the second submit but my concern is that the user hits Save and Continue then hits Submit for Approval right after that and duplicate records are created. I am interested in the query for the SharePoint ID on submit if the filename is equal to blank. but what is the risk of overriding or getting the same ID as another form? I wonder if they have to hit the button at the same time or is it within a second? Just thoughts of what the risks are. Funny thing is these forms are not very long and we have save as draft option. Sorry, I am just ranting now
  • 10-16-2017 02:05 PM In reply to

    Re: Save and Continue InfoPath with SharePoint workflow

    I think there are still some risks, sure - I don't know what all the various logic or buttons you have in your form are. :) Another option may be to push this to the user, in a way. Have a field in the form (not displayed) indicating whether the updated file name has been retrieved & disable "Submit for Approval" until it has. If the returned file name still matches the original name, you'd know it hasn't been updated.... Just thinking outloud here.
    Hilary Stoupa

  • 10-16-2017 02:19 PM In reply to

    Re: Save and Continue InfoPath with SharePoint workflow

    I have uploaded the form. I use a drop down for what action they would like to take. It is all driven from a list that also updated the Form Status based on the action. Remember this is a dev form so naming is a little off in some places
  • 10-16-2017 02:32 PM In reply to

    Re: Save and Continue InfoPath with SharePoint workflow

    Ah, I see - so it isn't like there is just a button you can disable. I would probably test with updating the form name on the next save, just to see if it worked - but I would probably also add some logic to prevent saving if the name hadn't been updated. Add an "original name" field or something so you can compare the current name to the original name and verify it has been updated before resaving. Maybe return an error to the user if it hasn't updated and you stop processing the rules.
    Hilary Stoupa

  • 10-16-2017 03:23 PM In reply to

    Re: Save and Continue InfoPath with SharePoint workflow

    So I am going to save it as the UserName + DateTime stamp then create a URL field in SharePiont to mask it with the Form Type and ID but the filename will always remain UserName + DateTime. Thanks you so much for all your help!
  • 10-16-2017 03:36 PM In reply to

    Re: Save and Continue InfoPath with SharePoint workflow

    Hey smarty pants, that's a great idea! :)
    Hilary Stoupa

  • 10-16-2017 04:06 PM In reply to

    Re: Save and Continue InfoPath with SharePoint workflow

    Even a broken clock is right twice a day :)
Page 1 of 1 (13 items)
Copyright © 2003-2017 Qdabra Software. All rights reserved.
View our Terms of Use.