Question

I have attached the screenshot. Most probably that the 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 to fix this issue?. Please check the screenshot:

enter image description here

Was it helpful?

Solution

Filemaker has no SumIf() function. You need to create a calculation field in the LineItems table, along the lines of:

If ( Paid = "N" ; Cost )

then sum this field at the invoice level (and/or summarize it at the LineItems table itself), instead of the Cost field.

--
BTW, it is much more convenient to define Boolean (yes/no) fields as Number and use the values of 1 for True, 0 (or empty) for False. Then the calculation can be simply:

   If ( not Paid ; Cost )
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top