1 Reply Latest reply on Mar 2, 2011 1:56 PM by TSBear

    calculation help (simple)

    kilbot

      Title

      calculation help (simple)

      Post

      Here is the calculation I started with

      If (IsEmpty ( amount_final_contract) and goal_type = "RC"
        ; 0 ; amount_final_contract * amount_fed_percentage )

      But what I want to do is

      If AMOUNT_FINAL_CONTRACT has a value in it AND GOAL_TYPE = "RC"

      then get AMOUNT_FINAL CONTRACT * AMOUNT_FED_GOAL

      if not 0

      thanks

        • 1. Re: calculation help (simple)

          kilbot:

          Thanks for posting!

          It looks like you're pretty close as is. First thing to change is to add a "not" in front of the IsEmpty statement. IsEmpty will return true if it's empty and false if it's not. Since we want it to return true if it's not empty, we just reverse it with "not".

          The other thing to look at is the syntax of the If statement. If statements should be setup like the following:

          If(Test;Result if True;Result if False)

          So, in your case, you'd just want to switch the two results which would leave you with:

          If(not(IsEmpty(amount_final_contract)) and goal_type = "RC";amount_final_contract * amount_fed_percentrage;0)

          TSBear

          FileMaker, Inc.