Submitting to InfoPath W/O Creating New form - InfoPath Dev
in

InfoPath Dev

Submitting to InfoPath W/O Creating New form

Last post 11-19-2006 06:03 AM by CycleFitness. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-17-2006 08:45 AM

    Submitting to InfoPath W/O Creating New form

    TO Patrick:

    In the "Using Code to Control the Sharepoint Submit Data Connection" section of your book you describe how to code a solution so that saving an existing form from a Sharepoint forms library will overwrite the existing one rather than creating a new one.

    I don't have Visual Studio, so am using the InfoPath editor. I have created this code:

    function XDocument::OnSubmitRequest(eventObj)
    {
    Dim submit As DAVAdapter
    submit = thisXDocument.DataAdapters.Item("Submit")
    If thisFilename Is Nothing Then
    thisFilename = submit.FileName
    End If
    submit.FileName = thisFileName
    submit.Submit()
    e.ReturnStatus = True
    }

    I guess there is something different I must do for the InfoPath editor because this code generates an error at the first Dim statement. I also tried completing step 11, which was to add the statement "Private thisFileName As String" to the "code just above the OnSubmitRequest event handler. That also generates an error.

    I would be very appreciate of any help to creating this solution.

    One other problem with this solution, though, is that I have "Submit with Rules" chosen. Your instructions say to "Submit with Code." If I chose Rules, will it then go to the code to look at the OnSubmitRequest handler?

    Thanks!
  • 11-17-2006 10:27 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Submitting to InfoPath W/O Creating New form

    Hi Deb,

    Check out these links and I think you will find an answer:

    http://office.microsoft.com/en-us/infopath/HA012073751033.aspx

    http://msdn2.microsoft.com/en-us/library/aa662351(office.11).aspx
  • 11-19-2006 06:03 AM In reply to

    Re: Submitting to InfoPath W/O Creating New form

    Neither of those help me. I'm sorry. I don't know how to construct this logic. The logic from Patrick's book is what I need, but I can't get that to work, so I just need a little help with that specific code.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.