Static ID # for Repeating Section, with ability to move the sections - InfoPath Dev
in

InfoPath Dev

Static ID # for Repeating Section, with ability to move the sections

Last post 06-26-2009 12:20 PM by wiibur. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 06-26-2009 12:20 PM

    • wiibur
    • Not Ranked
    • Joined on 06-26-2009
    • Posts 9

    Static ID # for Repeating Section, with ability to move the sections

    What I am trying to do is have a repeating section that has an ID # assigned to it. The way it works now is that I have an ID field which is assigned a value from an ID Iterator field that is incremented each time a new section is added. Pretty standard.

     The next thing I added to this form was the ability to move each section using the following code and stuff. I have two buttons, one to move the section up and one to move it down. As you can see from the code, it just performs a simple insert after/before for moving. The problem is that each time the form re-inserts the section, it is assigned a new ID # because the form thinks it is a new section.

     What I need help with is how to keep the ID # static. Any help will be appreciated.

     

    Up/Down button code (VBScript found from googling):

    Sub CTRL27_11_OnClick(eventObj)
    Dim oItem, oParent, oPrevious
    Set oItem = eventObj.Source
    Set oParent = oItem.parentNode
    Set oPrevious = oItem.previousSibling
    If Not (oPrevious Is Nothing) Then
    oParent.removeChild oItem
    oParent.insertBefore oItem, oPrevious
    End If
    End Sub

     

     

    Thanks again.

     

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