Just back from the Master Class and I am trying to implement some Input Parameters. I am using InfoPath 2007, MOSS and VB
I have created a form, Candidate Evaluations and published it to a sharepoint site. It has the following code
Public Sub FormEvents_Loading(ByVal sender As Object, ByVal e As LoadingEventArgs)
' Write your code here.
'Try
Dim VacIDin As String = "9999"
Dim VacParam As Boolean = e.InputParameters.TryGetValue("VacID", VacIDin)
Dim Candidatein As String = "aaaaaa"
Dim CandidateParam As Boolean = e.InputParameters.TryGetValue("CandName", Candidatein)
Dim VacancyIDfield As XPathNavigator = Me.CreateNavigator.SelectSingleNode("/my:myFields/my:FormFieldsGroup/my:VacancyID", NamespaceManager)
Dim CandidateName As XPathNavigator = Me.CreateNavigator.SelectSingleNode("/my:myFields/my:EvaluationFormGroup/my:CandidateName", NamespaceManager)
If VacParam = True Then
VacancyIDfield.SetValue(VacIDin)
End If
If CandidateParam = True Then
CandidateName.SetValue(Candidatein)
End If
'Catch ex As Exception
'End Try
End Sub
From another form I use the following URL http://in/hr/ATS/Candidate Evaluations/Forms/template.xsn?VacID=2&CandName=john doe
The form opens but my values have not been passed in. What else do I need to do ? How can I debug using these input parameters ? I don't know where it is failing.
Thank you
Catharine