logic - Create No to nearest Decimal in filemaker calculation -


i have database calculating shipping cost. logic of shipping cost such way calculated every 500gm. have price list according different weight when using calculation taking weight user example 1.4 unable next calculative weight of 1.5 , .7 1.0 , 1.7 2.0 how achieve this?

try (substitute mynumber different result):

let (  [    mynumber=2.6;    mynumberint = int(mynumber);    mynumberfr = mynumber - mynumberint;    mynumberfr = case ( mynumberfr =0;0;mynumberfr >0.5 ; 1;0.5 );    result = mynumberint + mynumberfr ] ;    result ) 

you can wrap in custom function, in case need change later throughout system.

i sure there better mathematical formula, should started


Comments

Popular posts from this blog

python - Installing PyDev in eclipse is failed -

PHP OOP-based login system -

c# - Nested Internal Class with Readonly Hashtable throws Null ref exception.. on assignment -