3 Replies Latest reply on Jul 23, 2010 8:08 AM by philmodjunk






      Iam trying to round up a field but iam having a problem.

      Iam using Round ( ToxinFields::Result ; 1 ) in the calculation field to round up but sometimes the field will have text in rather than a number. But the problem i have is that the above rounds up text to 0 how can I get round this?

      also could I display for example 34.0 rather than filermaker removing the zero.



        • 1. Re: rounding

          You should modify your design so that any text is entered in a separate text field so that this field either contains a number or is empty.

          You can select your field while in layout mode and use the inspector (filemaker 11) or Format | Number... (Older versions of filemaker) to establish a data format with a fixed number of decimals--1 in your case--to make sure 34 is displayed as 34.0.

          • 2. Re: rounding

            Ive created a new field like you said. Iam trying to do a calcultation for the LOQ fields that would set the field depending on what was entered in the result field. but i keep getting LOQ no matter what result is entered

            iam using

            If ( Toxin Type = "ASP"  &  ToxinResult < "1.25"; "LOQ")

            what Iam really trying to achive is this

            Toxin = DSP & Toxin Result < 10 = LOQ

            Toxin = ASP & Toxin Result < 1.25 = LOQ

            Toxin = PSP & Toxin Result < 10 = LOQ



            • 3. Re: rounding

              The ampersand (&) is an operator that "glues together" (concatenates) text. You need to use the AND logical operator instead and a case function in place of your If function. You also need to remove the quotes from around your numbers so they are evalutated as numbers instead of text.

              Case ( Toxin Type = "ASP" and ToxinResult < 1.25 ; "LOQ" ;
                          Toxin Type = "DSP" and ToxinResult < 10 ; "LOQ" ;
                          Toxin Type = "PSP" and ToxinResult < 10 ; "LOQ"