Hide Duplicates - InfoPath Dev
in

InfoPath Dev

Hide Duplicates

Last post 07-09-2007 01:08 PM by TogasPoon. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-09-2007 09:07 AM

    Hide Duplicates

    I've looked at several threads on this subject but I still can't get my form to work.

     

    I have a repeating table and I'd like to hide values if they are repeating based on the MeterType.  The data is coming from my Secondary data source and looks like this in InfoPath.

    myFields/dataFields/d:row/:MeterType

     

    I sure I want to use an Expression to hide the field I'm just not sure what that expression should be.

     

    Thanks. 

     

     

  • 07-09-2007 11:44 AM In reply to

    In this situation you need to use the preceding-sibling syntax to check if any preceeding nodes match your current node and if so then hide. You can find good help on such advanced XPath formulas from this page: http://www.w3schools.com/xpath/xpath_axes.asp

    It would be something like preceding-sibling::/myFields/dataFields/d:row[d:MeterType=current()/d:MeterType]. I'm not an xpath expert but have used similar constructs to achieve what you want.

    Shiraz Cupala / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 07-09-2007 01:08 PM In reply to

    This hides ALL the entries.

    not(d:MeterType = current()/preceding-sibling::d:MeterType)

     All these preceding-sibling threads are giving me a headache.
     

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