Conditional Formatting on Repeating Table - InfoPath Dev
in

InfoPath Dev

Conditional Formatting on Repeating Table

Last post 04-20-2010 01:17 PM by bryanstrader. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-20-2010 11:12 AM

    Conditional Formatting on Repeating Table

    I want to hide a table if it has only one record, but show it if it has more than 1 record. The problem is any condition I set seems to be evaluated for each record, so the number of occurrences is always one. I want to set a condition on the repeating table, if count(.) = 1, then hide control.
    Bryan Strader
    Software Developer
  • 04-20-2010 11:30 AM In reply to

    Re: Conditional Formatting on Repeating Table

    Place the table inside a section control, and then conditionally hide that.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 04-20-2010 11:46 AM In reply to

    Re: Conditional Formatting on Repeating Table

    Thanks Jimmy - I was hoping I wouldn't have to alter my data structure at all, which adding a section does. Especially because this is just for the print view part of my form.

     

    Do you know of a way I can add a section without binding it to the main data source?

    Bryan Strader
    Software Developer
  • 04-20-2010 12:07 PM In reply to

    Re: Conditional Formatting on Repeating Table

    A section can be bound to any node in any of your data sources.  Just drag any node into the view with the right mouse button and select the Section option.  If your repeating group has a non-repeating parent, that would be an ideal node to bind the section to.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 04-20-2010 01:17 PM In reply to

    Re: Conditional Formatting on Repeating Table

    Thanks for you help Jimmy. I was able to accomplish my task be putting the conditional formatting on the parent group instead of creating a new section all together. I just copied and pasted the section so it exists twice on my view, then based on the row count of the nested repeating table, I either show one section or the other, both of which contain the same data and elements.

     

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