Adding a row to a reapting table - InfoPath Dev
in

InfoPath Dev

Adding a row to a reapting table

Last post 05-13-2008 11:14 AM by Bill . 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 05-13-2008 11:14 AM

    • Bill
    • Top 200 Contributor
      Male
    • Joined on 09-26-2006
    • USA
    • Posts 57

    Adding a row to a reapting table

    Dim newVal1 As String

    Dim row, parent As MSXML.IXMLDOMNode

    If thisXDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:App1171/@A174Q15a1").text = "Y" Then

    thisXDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:App1171/d:DHS1171_Application/d:DHS1171_HouseholdMember/d:DHS1171_OtherIncomes/@IncomeSourceType").text = "RSDI"

    newVal1 = thisXDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:App1171/d:DHS1171_Application/d:DHS1171_HouseholdMember/d:DHS1171_OtherIncomes/@IncomeSourceType").text

    'get a reference to the node the repeating table is bound to

    row = thisXDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:App1171/d:DHS1171_Application/d:DHS1171_HouseholdMember/d:DHS1171_OtherIncomes/")

    'make a copy of the node by cloning it

    row = row.cloneNode(True)

    'set the new values

    row.selectSingleNode("/dfs:myFields/dfs:dataFields/d:App1171/d:DHS1171_Application/d:DHS1171_HouseholdMember/d:DHS1171_OtherIncomes/@IncomeSourceType").text = "Select..."

    'append the cloned row to the parent node

    parent = thisXDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:App1171/d:DHS1171_Application/d:DHS1171_HouseholdMember")

    parent.appendChild(row)

    End If

    It makes it thru the clone process w/o any errors but I never see the new row on my form.  Can someone please tell me what I am doing wrong.

     

    Thanks! 

    William L Fringer
    Database Administrator/Systems Integration Specialists

    L & S Associates, Inc.
    Michigan State University Corporate Research Park

    1-800-766-6185, ext 2076
Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.