Help with repeating table - InfoPath Dev
in

InfoPath Dev

Help with repeating table

Last post 03-10-2009 05:09 PM by doctorcpu. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-10-2009 07:05 AM

    Help with repeating table

     

     How do I add a new row to a repeating table with the value of TTaxie below assigned to Field3 of the new row?

     

    This is what I've found searching google but it fails to locate the last row I think.

    Any help is as always appreciated. 

     

    Dim fieldValue1 As String = MainDataSource.CreateNavigator().SelectSingleNode( _ "/my:myFields/my:field11", NamespaceManager).Value

    Dim TTaxie As String = fieldValue1

    SetFieldValue(TTaxie,/my:myFields/my:CopiedData/CopyDataRow/my:CopiedDataRow_9")

     

    Public Sub SetFieldValue(ByVal Value As String, ByVal xpath As String)

    ' This procedure allows you to det the value of a Data source.

    ' When calling this procedure you must pass it the value (to be set) and location of the data source.

    ' SetFieldValue("XXX", "my:QuotingToolFields/my:Offices/my:OfficeInfo/my:OfficeName")

    ' or you can read a spcific row in a repeating table:

    ' SetFieldValue("XXX", "my:QuotingToolFields/my:Offices/my:OfficeInfo[32]/my:OfficeName")

    ' or you can use a verable for the row:

    ' SetFieldValue("XXX", "my:QuotingToolFields/my:Offices/my:OfficeInfo[" & CurrentOffice & "]/my:OfficeName")

    Dim root As Xml.XPath.XPathNavigator = Me.MainDataSource().CreateNavigator()

    Dim field As Xml.XPath.XPathNavigator = root.SelectSingleNode(xpath, Me.NamespaceManager())

    field.SetValue(Value)

     

     

    End Sub

     

  • 03-10-2009 05:09 PM In reply to

    Re: Help with repeating table

    I found the error in the setfieldvalue sub's xpath I was passing. 

     

    Thanks for your consideration.

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