Using a list box to identfy a field in a repeating table to sum - InfoPath Dev
in

InfoPath Dev

Using a list box to identfy a field in a repeating table to sum

Last post 04-06-2012 01:41 PM by Anson Hidajat. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-05-2012 01:27 PM

    Using a list box to identfy a field in a repeating table to sum

    Hello,

     This seems like it should be easy to setup but I can't seem to produce a working formula.  I am using InfoPath 2007.

    The Data Table: 

    I have a repeating table that contains rates for benefits and/or services.  Column 1 contains a service code, column 2 contains identifies the invoice column to rates should be applied to and the remaining columns contain the rates as they apply to membership (i.e. Employee only, Employee and spouse, Family ect.)

    The list: 

    Within the same form I want to create a second repeating table that will use the first table to generate billing adjustments.  This table will include the suscribers name, adjustment month, membership status and summed rates.  I can get the rates for a field to sum by invoice column fine but I can only get the calc to work by membership by setting up a rule for each membership status statically.  Each membership status is a column in the first table (or rather a field in group 1).  In the second table the membership status is selected from a list box.  What I would like the formula to do is filter the first table by the invoice column (so far this piece is working) then use the membership status list box in the second table to identify the corresponding column (field) in the first table to sum the rates.

    Summary: 

    I can't seem to figure out to set the formula to recognize - if field in group 1 = membership status in group 2 then sum.  Is this evem possible?

    Thanks in advance for any advice on this.

  • 04-06-2012 01:41 PM In reply to

    Re: Using a list box to identfy a field in a repeating table to sum

    Not sure if I'm understanding your scenario correctly, but I included a sample xsn that may be useful for you.  The text box on the bottom will sum all of the second column in the repeating table for rows where the first column is equal to "a".  You'll need to just use the sum function on the repeating field and add a filter to make sure it only adds values where a certain condition happens.  In my case it was when the first column was equal to "a".
    Anson Hidajat
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

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