2 Replies Latest reply on Dec 3, 2010 7:19 AM by Amitkshetarpal

    Calculated Field question

    Amitkshetarpal

      Title

      Calculated Field question

      Post

      I have a database with 3 fields. InitialScore, Currentscore and Changesinscore. ChangesinScore is calcualted as (InitialScore-CurrentScore)/InitialScore. The problem is that calculation occurs even when there is no value in CurrentScore. How do I write the calculation that only occurs when there is an Entry in CurrentScore field?

      Thanks,

      Amit

        • 1. Re: Calculated Field question
          philmodjunk

          If ( CurrentScore ; InitialScore-CurrentScore)/InitialScore ; "" )

          Note: In a number field, missing values and zero are treated as False, other values are True.

          If you only want this to happen when CurrentScore is Empty, do it this way:

          If ( not IsEmpty ( CurrentScore ) ; InitialScore-CurrentScore)/InitialScore ; "" )

          And in both cases, I've added ; "" for clarity to show what is returned if the value is not true. You can leave that parameter out completely and still get the same results.

          • 2. Re: Calculated Field question
            Amitkshetarpal

            It worked with a minor modification:

            If ( not IsEmpty ( CurrentScore ) ;( InitialScore-CurrentScore)/InitialScore ; "" )

            Thanks