Count Filtered Repeating Table Row Based on Value - InfoPath Dev
in

InfoPath Dev

Count Filtered Repeating Table Row Based on Value

Last post 04-27-2016 09:46 AM by Hilary Stoupa. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 04-25-2016 05:33 AM

    Count Filtered Repeating Table Row Based on Value

    All,

    Monday Madness,

    I'm filtering a SP list based on a date range as described here. I've added a column to my list (Event) with the value of 1 for certain dates.

    How can I count the number of rows in the filtered table if an event = 1?

    Basic filtering is counting all events which = 1, not those based on my date range

    Thanks

    W 

  • 04-25-2016 09:36 AM In reply to

    Re: Count Filtered Repeating Table Row Based on Value

    I think you'll just have to add the date filtering to the formula you are using for your count - you'll need to manually edit the XPath to do that, I think - but you may be able to copy the expressions you are using to hide rows and re-use those. Feel free to attach your template under the Options tab in a reply if you'd like a hand, or paste all your XPaths into a reply & we'll see if I can guess what it should be. :)
    Hilary Stoupa

  • 04-26-2016 02:20 AM In reply to

    Re: Count Filtered Repeating Table Row Based on Value

     Thanks, XPath is something I've not got into.

    FYI - the form loads the current user name using get user profile service.

    My SharePoint List is as follows: Title, Date, Event

    There are a few others columns, yet. the are dummies, trying to figure a few things out.

    W 

  • 04-26-2016 07:42 AM In reply to

    Re: Count Filtered Repeating Table Row Based on Value

    Give this one a try - I changed your formula in field2 to count (hopefully!) all rows where Event = 1 and the date range is in the selected start / end date....
    Hilary Stoupa

  • 04-26-2016 09:05 AM In reply to

    Re: Count Filtered Repeating Table Row Based on Value

     Thanks, the count works if I add 1 to the event column in the repeating table.

    Yet, as soon as I change the End Date picker, it seems to go into a loop. It doesn't like the 1 in the event column in the repeating table.

    W 

  • 04-26-2016 10:03 AM In reply to

    Re: Count Filtered Repeating Table Row Based on Value

    Do you not want the event to = 1? Sorry, thought that was part of your original description of what you wanted. What does "seems to go into a loop" mean? Here is a version w/out the Event = 1 in the field2 count formula.
    Hilary Stoupa

  • 04-27-2016 02:49 AM In reply to

    Re: Count Filtered Repeating Table Row Based on Value

    Hilary,

    Thank you so much, The original expression formula seems to work, I've had to change my form slightly.

    I added a rule to my Start Date field so that it set the end date to be the same value when the start date changed.

    Then I added a second rule to my End Date field which was to set field 2 to the value of your expression. 

     

  • 04-27-2016 09:46 AM In reply to

    Re: Count Filtered Repeating Table Row Based on Value

    Fantastic, glad you have it working!
    Hilary Stoupa

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