1 Reply Latest reply on Mar 16, 2014 6:54 AM by philmodjunk

    sum of cost amount calculation

    AbinusJR

      Title

      sum of cost amount calculation

      Post

           Hi All, I have attached the screenshot. most probably that image itself will explain my logic. let me paste the code i have used in the fields. Product Info1 field which hold "Y" & "N".
      RemainingCosu2=If(Invoice Line Items::Product Info1  = GetAsText ("N"); Sum(Cost Total) - Invoice Line Items::VendPaid_total;0)

      RemainingCosu1=If(Vendor Status="Partly Paid"; RemainingCosu2; 0). what should i do fix this issue?

      doubt.jpg

        • 1. Re: sum of cost amount calculation
          philmodjunk

               Your screen shot looks like a portal. Is it? Is it a portal to LineItems or some other table?

               In what table is your calculation defined? Is it a calculation field or a number field with an auto-entered calculation?

               You describe two fields:

          RemainingCosu2=If(Invoice Line Items::Product Info1  = GetAsText ("N"); Sum(Cost Total) - Invoice Line Items::VendPaid_total;0) RemainingCosu1=If(Vendor Status="Partly Paid"; RemainingCosu2; 0)

               Which column is RemainingCosu2 and which RemainingCosu1 in your screen shot?

               In the first calculation, What you have posted does not look like the complete calculation. It looks like part of an If or Case function and if you tried to use exactly what you posted, you would get an immediate error message.

               Also Sum (Cost Total) does not make sense. I suggest looking up the Sum function in FileMaker help. What you have written could be re-written as: Cost Total - Invoice Line Items::VendPaid_total

               instead of Sum ( Cost Total ) - Invoice Line Items::VendPaid_total