How do I check if a Filename already exists in SP form library from IP 03 before submitting? - InfoPath Dev
in

InfoPath Dev

How do I check if a Filename already exists in SP form library from IP 03 before submitting?

Last post 10-15-2009 05:41 AM by princevis. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-08-2009 08:31 AM

    How do I check if a Filename already exists in SP form library from IP 03 before submitting?

    I have a form library in SP. Users can click 'New' to create a new form, then they click a 'Register' button which submits the form

    Problem: If they click 'New' then 'Register' again this overwrites the form and they loose all the data they had on the previous form. I need to find a way to check if the filename already exists before.

    Can this be done using a rule?? I have a data connection to the form library, but can't figure out how to search it. Also the Register button uses VBScript, heres what i have so far

    Sub btnRegister_OnClick(eventObj)

     userChoice = XDocument.UI.Confirm("Are you sure your registration details are correct?", 4)
     
     If userChoice = 6 Then
      
      XDocument.DOM.selectSingleNode("my:myFields/my:Current_Status").Text = "New PPR Form" 
      XDocument.DOM.selectSingleNode("my:myFields/my:Submitted").Text = 1
      XDocument.Submit()
      XDocument.View.Window.Close(true)

     Else
     
      XDocument.UI.Alert("Please contact Human Resources to amend your details")
      XDocument.View.Window.Close(true)
     
     End If
    End Sub

       

  • 10-15-2009 05:41 AM In reply to

    Re: How do I check if a Filename already exists in SP form library from IP 03 before submitting?

    Sorry for replying late.I thought by the time u must have found a solution to ur problem.If not,then shile creating a dataconnection to submit a form to ur library,u have to define the url of ur form library and then in the second row,instead of submitting it with a name form,select some unique function for that click on Fx button and select now() from the list.Now when u'll submit the form it wont get overwrite..

    Let me know if u still face this issue..

    Vishal Srivastava
    Senior Software Engineer
    SDG Software Pvt Ltd
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.