Repeating Section Oddity - InfoPath Dev
in

InfoPath Dev

Repeating Section Oddity

Last post 02-22-2006 05:26 PM by Shanthi Reddy. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 02-16-2006 12:32 PM

    Repeating Section Oddity

    I have a form with a repeating section in it.
    in the repeating section I have a dropdown field that pulls data from a SQL database, all works as it should.
    On the dropdown filed I have a rule that sets the value of a second field based on the selection.
    The data for the second field is in the same database as the selection options for the drop down, all works as it should!

    Now the oddity....
    when I insert a second record in the repeating section the drop down behaves as it should and list all options it should BUT
    The rule that sets the value in the second field does not
    If the name I pick in the dropdown is alphabetically before the previous selected name all is well but if it is after the previously selected name it returns the value as if I had selected the first name.

    DATA:

    AMBER,1
    BLUE,2
    CYAN,3

    example

    First Section
    Color: BLUE Number: 2

    Second Section
    Color: AMBER Number: 1


    First Section
    Color: BLUE Number: 2

    Second Section
    Color: CYAN Number: 2

    Any Ideas? I am about ready to call Microsoft.
  • 02-17-2006 07:10 AM In reply to

    • ahardin
    • Top 200 Contributor
    • Joined on 02-13-2006
    • United Kingdom
    • Posts 55

    Re: Repeating Section Oddity

    Have you thought of using the current() function which tells the database which row to check against.

    One other thing you could do is to set a rule on line instert that clears both the cells out to prevent and data holdover from the previous row

    Cheers Adam

    I'm from WALES
    [email protected]
    I'm from WALES
    [email protected]
  • 02-17-2006 12:46 PM In reply to

    Re: Repeating Section Oddity

    I have tried both.
    The blanking rule makes no differance as the secondary field is blank to start with.

    the current() function does not return any data at all correct or not.

    here is the code from the rule

    xdXDocument:GetDOM("Vendor Contacts")/dfs:myFields/dfs:dataFields/dfs:Vendor_Contacts/@E-mail_Address[../@Company = xdXDocument:get-DOM()/my:MainData/my:Fields_for_2-Product-Specs-sub/my:bidinfo/@my:VendorName]
  • 02-22-2006 05:26 PM In reply to

    Re: Repeating Section Oddity

    Hello
    Have you tried using preceding-sibling to get the value of the previous node and use that to set the second node. You can get more information on preceding-sibling axis athttp://www.infopathdev.com/howto/tips/default.aspx?i=2d9c464bbf4146ae91bf66395dca34ad

    Shanthi
    InfoPath Dev India
    Shanthi Reddy
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.