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