Confusion with current() when Repeating section within repeating table - InfoPath Dev
in

InfoPath Dev

Confusion with current() when Repeating section within repeating table

Last post 09-21-2011 06:08 AM by Jimmy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-21-2011 05:52 AM

    Confusion with current() when Repeating section within repeating table

    Hi,

    I am using infopath 2007.

    I have two Data connections  

    A
    dataFields
    d:RequestItems <--- Repeating
    RequestID
    RequestItem

    B
    dataFields
    row <--- Repeating
    RequestID
    ActivityDate
    Comments

    For each form I may have many records in A which I want displayed.

    For each A I may have many records in B

    I want to have a repeating table of A and add an additonal column to show show a repeating section displaying events from B, where the RequestIDs match..

    I have the structure set up as desired - and I am attempting to put conditional formatting on the repeating section(B), so that the items only display when the requestids match.  I am obviously having a problem with understanding how current() should be used in this case.

    I have put an expression box in the final column - outside the repeating section and have the formula current()/@RequestID in that box.  This displays the correct requestID.

    On the repeating section based on B I have tried

    RequestID != xdXDocument:get-DOM()/dfs:dataFields/d:RequestItems/@RequestID

    RequestID != current()/@RequestID

    RequestID !=current()/d:RequestItems/@RequestID

    None of them work...  I am guessing that the current() is looking at the B repeating section not the A repeating table Could someone please point me in the right direction. 

    Thank you.

    Catharine

    Filed under: ,
  • 09-21-2011 06:08 AM In reply to

    Re: Confusion with current() when Repeating section within repeating table

    Unfortunately, I don't think there's an easy way to do this.  current() refers to the current row of the inner repeating structure and I don't think there's a way to refer to the outer repeating row from your formula.

     This came up recently in another thread, and here are the possible solutions that I was able to come up with:

    http://www.infopathdev.com/forums/p/20221/70157.aspx#70157

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.