AnsweredAssumed Answered

Simple if then else

Question asked by dash4689 on Feb 2, 2011
Latest reply on Feb 7, 2011 by philmodjunk


Simple if then else


I'm a newbe who has been asked to develop a database to manage our inventory of products.  I've been given the book FileMaker Pro by Steven Schwarts who says to use the If ( Test, Expression1, Expresion2) model. He also says I can nest If functions within each other to add choices, but gives no examples.

A simple example of my database has 5 fields involved. The product is selected via a menu button for the  PRODUCT  field,  That selection sends the  number in the CASES field to either YO2, YO4, or YO8 field.

My field definition as follows. 

If (Product; "YO2"; Prod YO2 = Cases,"")  gives me an error message that I have to many parameters.

If (Product; "YO2"; Prod YO2 = Cases)     This puts the product name, e.g. YO2, YO4, and YO8 inserted into the field of the same name, and not the number of cases.    We're using FM Pro v. 7

I have tried every variation I can think of, but nothing worked, but then I'm quite green at this. So thanks for your help.