3 Replies Latest reply on May 14, 2012 2:37 PM by philmodjunk

    repeat checkbox in calculation

    JimVanHorn

      Title

      repeat checkbox in calculation

      Post

      Current setup: repeated line amount and a single sales tax calculation.

      Line Amount   ::   Number[15]
      Sales Tax   ::   Calculation   ::   Indexed, = Round( Sum(Line Amount) * Tax Rate; 2 )

      Works fine except for those line items that should not be taxed.  I've added a repeating checkbox and it appears to function correctly in the layout (i.e. individual lines can be checked/unchecked) but so far I haven't figured out how to modify the Sales Tax caclulation so that only the checked lines are included in the calculation.

      Many thanks for all tips and pointers.

      -jvh

        • 1. Re: repeat checkbox in calculation
          philmodjunk

          I suppose if I worked at it, I might get this to work, but i strongly recommend that you not use repeating fields to list individual line items.

          You'll find it much simpler to use a related table of line items in a portal. And then a calculation field can return the line amount for each item that is taxable so that this calculation field can then be summed to correctly compute the tax.

          • 2. Re: repeat checkbox in calculation
            JimVanHorn

            Agreed.  Life would be a ton easier I didn't have to fix legacy systems and worry about backwards compatibility.

            I've read that repetitions can be split into individual fields as an option during export.  Haven't tried it yet.  Not sure I want to go that far to fix a little problem that everyone has just worked around for all these years.

            -jvh

            • 3. Re: repeat checkbox in calculation
              philmodjunk

              Given that there are many other headaches that come up in an invoicing system when you try to use repeating fields, I think this one's likely to be worth the effort.Wink

              When you IMPORT data from one filemaker table into another, you get a check box you can select that will spearate the contents of a repeating field into separate records. This can usually make dividing your data during import into a table you now set up as a related table of line items fairly easy to do.