AnsweredAssumed Answered

how can I use (if) with (sum) and (and)

Question asked by MohammedAhmed on Oct 27, 2013
Latest reply on Oct 29, 2013 by MohammedAhmed

Title

how can I use (if) with (sum) and (and)

Post

     Hi guys,
      
     Im new in Filemaker and I facing a difficulty to write a function.
      
     I have two tables
      
     the first table has 4 fields:
      
     ID, price, statue, value
      
     the second table has 2 fields:
      
     ID, Result
      
     there is a relationship between table1 and table2 in the ID fields (many to many)
      
     I am trying to write a function in table2 in the (Result) field but I couldn't get the right result that I'm looking for ... it seems to me that the function (and) desn't work.... I don't know honestly.
      
     This is my function, please correct me if I'm wrong:
      
     If ( table1::statue = "b"  and  table1::price = 26 ;Sum(table1::value); 0)
      
     Thank you for your help
      
     Mohammed.

Outcomes