2 Replies Latest reply on Mar 27, 2009 8:36 AM by TSGal

    "If field > 0 " not working with some decimal values.



      "If field > 0 " not working with some decimal values.






      Just look at that.

      I can be trained to do simple things.

      Like not typing your name in all caps.


      App kase ho:manvery-happy:  


      FM 9 Advanced

      Microsoft PC running XP Pro

      In Manage Database screen the field (ScoresAggsScores0 ) is TYPE Numeric.

      In the Options for field screen in the AUTO-ENTER Tab the only item checked is CALCULATED VALUE.

      The calculations is: ScoresAggsScores0  / 1000.

      The “Do not evaluate if all referenced fields are empty.”  Is checked.

      There is a warning/comment: Calculation result must be Number. 

      On the Validation Tab I have ticked the Only during data entry radio button.

      I have checked the Maximum number of characters: Check Box and entered 5.

      I have checked the Display custom message if validation fails and entered “Opp’s”. 

      On the Storage Tab I ticked the Indexing All radio button.  

      I have not touched the Furigana Tab.


      In a Script I have the step:

      “If[ScoresAggs::ScoresAggsScores0 > 0]”           

      Show Custom Dialog[“Debug Message”;”This score is greater that zero”]

      End If
      Finally I get to the problem: 

      If I have any value in the field from .001 through .122 I do not get a hit on the message.

      Actual data tested .012 .096 .111 .122

      For values above .122 it works fine. 

      When I use Specify Calculation screen in the script builder the Warning/Comment on the screen displays:

      Calculation result must be Boolean 

      Non-zero values are true, zero and empty values are false. 


      I set the field up as Numeric but when I reference it, it looks like it thinks it is Boolean. 


      What do you think I have done wrong?



        • 1. Re: "If field > 0 " not working with some decimal values.

          Please disregard this post. 


          I had a sort step in the wrong place.


          I think I have been working too many hours.:smileysad:



          I remain just piddlin in the past



          • 2. Re: "If field > 0 " not working with some decimal values.



            Thank you for your post.


            It doesn't appear you have done anything wrong.  If a value is greater than zero, then the message should appear, regardless.


            Just in case there was a problem, I went to my Dell Dimension computer which is running Windows XP, and I launched Filemaker Pro 9 Advanced, so I could try to closely duplicate your set up.  I created the ScoresAggsScores0 field, included the calculation and everything else, and for all values greater than 0, the message appears, including .001, .012, .096, .111 and .122.


            Some clarification....  When you use an If [] script statement, the result of that expression must be either true of false.  That is, if the value is true, then execute the next set of steps until either an Else or End If statement occurs.  So, the result of that calculation must be boolean.  Does that make sense?  Therefore, ScoresAggsScores0 > 0 results in either being true or false.


            If you want me to look at your file, I have sent you a private message (top of this screen - right side - just below the blue bar - X Messages) with instructions where to send the file.



            FileMaker, Inc.