3 Replies Latest reply on Jul 16, 2009 8:09 PM by RickWhitelaw

    Taking no action when a field is empty

    snkm

      Title

      Taking no action when a field is empty

      Post

      Here is my current formula:

       

      If (IsEmpty ( Tester_Bug_Points );;

      If(Tester_BugRatio=0 and PROJECTS:: Project_Bug_points_NEW >8 and PROJECTS:: Project_Bug_points_NEW <12;1;

      If(Tester_BugRatio=0 and PROJECTS:: Project_Bug_points_NEW >3 and PROJECTS:: Project_Bug_points_NEW <9;2;

      If(Tester_BugRatio=0 and PROJECTS:: Project_Bug_points_NEW <4;3;

      If(Tester_BugRatio=0 or Tester_BugRatio>0 and Tester_BugRatio<.0249;1;

      If(Tester_BugRatio>.025 and Tester_BugRatio<.0499;2;

      If(Tester_BugRatio>.05 and Tester_BugRatio<.0749;3;

      If(Tester_BugRatio>.075 and Tester_BugRatio<.09994;4;

      If(Tester_BugRatio>.09995;5;"" ))))))))

       

      If the Tester_Bug_Points field is empty, I want the score to not be calculated.  Any ideas?

        • 1. Re: Taking no action when a field is empty
          etripoli
            

          First, use Case instead:

           

          Case (IsEmpty ( Tester_Bug_Points ); "";

          Tester_BugRatio=0 and PROJECTS:: Project_Bug_points_NEW >8 and PROJECTS:: Project_Bug_points_NEW <12;1;

          Tester_BugRatio=0 and PROJECTS:: Project_Bug_points_NEW >3 and PROJECTS:: Project_Bug_points_NEW <9;2;

          Tester_BugRatio=0 and PROJECTS:: Project_Bug_points_NEW <4;3;

          Tester_BugRatio=0 or Tester_BugRatio>0 and Tester_BugRatio<.0249;1;

          Tester_BugRatio<.0499;2;

          Tester_BugRatio<.0749;3;

          Tester_BugRatio<.09994;4;

          Tester_BugRatio>.09995;5;"")

           

          • 2. Re: Taking no action when a field is empty
            ninja
              

            Howdy snkm,

             

            Some prefer If's, some prefer Case, if the formula is logical it won't make much difference.  At the end of the day, however, note the crucial addition that etripoli put in that your expression is missing...the "".

             

            In your first IsEmpty, you have          If (IsEmpty ( Tester_Bug_Points );;

             

            when you should have               If (IsEmpty ( Tester_Bug_Points );"";

             

            It is the double quotes with nothing between that sets the field to a blank.

             

            Is this what you were missing?

            • 3. Re: Taking no action when a field is empty
              RickWhitelaw
                

              Agreed on almost all points . . . a series of If(test;result) with the final being If(test;result;default result) seems odd to me. Using case seems to make more sense as it is meant to work as a series of "test;result" with the last" ; " denoting default result. On the other hand, perhaps the series of "If" statements may do exactly the same thing . . . never had a reason to try it.

               

              RW