Form should modify but creates new - InfoPath Dev
in

InfoPath Dev

Form should modify but creates new

Last post 05-20-2006 11:36 AM by joeldpalmer. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 05-12-2006 03:37 PM

    Form should modify but creates new

    I am submitting my form to a SharePoint form library via custom code. In my dev environment all is well. If a user opens a form previously submitted and they edit it and re-submit, all is fine. In my client's environment when they do the same thing it creates a new form in the library instead of overwriting it. The file name contains the date and so if they modify it the same day they don't see the issue but if they edit the next day it simply creates a new file. The only difference that I know of is that I am using InfoPath 2003 SP2 and they are using SP1. Please help and I will owe somebody big! :)

    Thanks,
    Joel
  • 05-15-2006 01:05 AM In reply to

    Re: Form should modify but creates new

    Hello Joel Welcome to Forums,
    One question that I have for you - Did you check the same scenario which the client#%92s environment faced on you dev environment? If you use date in file name then new form will be created when you open already submitted form and re-submit. Its better not to use date in file name, if you intend to you date in file name then you must write some code.

    Hope this helps!
  • 05-15-2006 10:40 AM In reply to

    Re: Form should modify but creates new

    I am using WebDAV to check if the file is new and if not then use the current file name. This works in my dev environment just not with the client's environment. I want to know if their is some kind of configuation that they may have missed or if it is the difference in service packs.

    Thanks,
    Joel
  • 05-15-2006 11:35 AM In reply to

    Re: Form should modify but creates new

    It never hurts to update the service packs!
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 05-15-2006 11:42 AM In reply to

    Re: Form should modify but creates new

    I agree Matt, but the client refuses. They initially agreed to it but now can't. If anybody has seen this issue before, please help.

    Thanks,
    Joel
  • 05-15-2006 02:29 PM In reply to

    Re: Form should modify but creates new

    Here is the code I am using to use the current form's name (contains a date). In my dev environment using InfoPath 2003 SP2 all is well, in my client's environment (SP1) a new form is added to the library when it is re-submitted that is named with the current date as opposed to just updating the current form. I have had similar code working with SP1 so I don't think it should matter. I am guessing that the client may be missing some other resource or missed a config step. I hope this extra info will help me get help.
    Any and all comments are greatly appreciated and I fully intend to contribute help to others in the future.


    if (! thisXDocument.IsNew)
    {
    DAVAdapter davAdapter = thisXDocument.DataAdapters["Main Submit"] as DAVAdapter;
    if (thisXDocument.URI.StartsWith(davAdapter.FolderURL))
    {
    thisFileName = thisXDocument.URI.Substring(davAdapter.FolderURL.Length);
    }


  • 05-20-2006 04:23 AM In reply to

    Re: Form should modify but creates new

    Hello Joel,
    Are you sure that they opening the file from SharePoint and they haven't saved the xml file somewhere on their machine? One way to solve the problem is to set the fileName in the MainDom while submitting this way you will have the filename always.

    In the above code the thisFileName will not be set if they first submit the file to Sharepoint and then save it to local machine and then open from there.
  • 05-20-2006 11:36 AM In reply to

    Re: Form should modify but creates new

    Thanks Shailaja. I ended up going on site, deploying it myself from scratch and everything worked fine. I don't know what they were doing wrong. I am curious for future reference. Thanks for all the replies.
Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.