URL Parameter not being Passed into Form using Visual Basic - InfoPath Dev
in

InfoPath Dev

URL Parameter not being Passed into Form using Visual Basic

Last post 06-06-2014 08:25 AM by jkapaun34. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 06-06-2014 08:25 AM

    URL Parameter not being Passed into Form using Visual Basic

    I am trying to pass a variable from a Hyperlink into an InfoPath 2010 Filler Form. My e.InputParameters does not appear to be getting the value from my hyperlink. I am guessing that I am missing some piece of code still but not sure. When the form loads I aways have the else value in my text box. Any help would be great.

     Here is my hyperlink code:  http://portal.loram.com/IntSup/accounting/RedirectFile/Invoicing.xsn?docid=FR-C10-BCCC-9JTTL5

    Imports Microsoft.Office.InfoPath

    Imports System

    Imports System.Web

    Imports System.Xml

    Imports System.Xml.XPath

    Imports System.Collections

    Imports System.Windows.Forms

    Imports System.IO

    Imports System.Uri

    Imports mshtml

    Namespace Invoicing Public Class FormCode

    ' Member variables are not supported in browser-enabled forms.

    ' Instead, write and read these values from the FormState

    ' dictionary using code such as the following:

    '

    'Private Property _memberVariable() As Object

    ' Get

    ' _memberVariable = FormState("_memberVariable")

    ' End Get

    'Set(ByVal value As Object)

    ' FormState("_memberVariable") = value

    ' End Set

    'End Property

    ' NOTE: The following procedure is required by Microsoft InfoPath.

    ' It can be modified using Microsoft InfoPath.

    Private Sub InternalStartup(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Startup AddHandler EventManager.FormEvents.Loading, AddressOf FormEvents_Loading

    End Sub

    Public Sub FormEvents_Loading(ByVal sender As Object, ByVal e As LoadingEventArgs)

    Dim mainDS As XPathNavigator = MainDataSource.CreateNavigator()

    Dim vdocid As String = String.Empty

    If e.InputParameters.TryGetValue("docid", vdocid) Then

    mainDS.SelectSingleNode("/dfs:myFields/my:vdocid", _

    NamespaceManager).SetValue(vdocid)

    Else

    mainDS.SelectSingleNode("/dfs:myFields/my:vdocid", _ NamespaceManager).SetValue("FR-C11-BCCC-9FP2KR")

    End If

    End Sub

    End Class

    End Namespace

     

     

Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.