metricLengthConverter ( number ; unitFrom ; unitTo )

Version 2

     

    Custom Function

     

    Compatibility
    Creator
    Mac OS X
    Henry Wolff
    FMP 10, 11
    MSM GmbH
    Web: Yes
    File Type: None
    Server: Yes
    FileSize: 0 kilobytes
    http://www.msm-gmbh.de

    Description

    converting of metric dimensions in both directions does not convert imperial dimensions

     


    Code

    Let ( [ from = Case ( unitFrom = „mm“ ; 1 ;

    unitFrom = „cm“ ; 10 ;

    unitFrom = „dm“ ; 100 ;

    unitFrom = „m“ ; 1000 ;

    unitFrom = „km“ ; 1000000 ;

    0 ) ;

    to = Case ( unitTo = „mm“ ; 1 ;

    unitTo = „cm“ ; 10 ;

    unitTo = „dm“ ; 100 ;

    unitTo = „m“ ; 1000 ;

    unitTo = „km“ ; 1000000 ;

    „error“ ) ;

    factor = If ( to = „error“ ; 0 ; unitFrom / unitTo ) ] ;

     

    number * factor )

     

     

    Sample Input

    Sample Output
    m;km;1000

    1

    Developer's Notes

     

     


    FileMaker Inc. provides this content on an “As Is” basis, without any warranty, and subject to the terms of the FileMaker Technical Network Agreement. FileMaker makes no representations and is not liable for any content or related information. You may use the content as part of your own solutions and for your customers, but you may not otherwise publicly distribute any content that you did not submit. ©2009-2011 FileMaker, Inc. All Rights Reserved. FileMaker is a trademark of FileMaker, Inc. registered in the U.S. and other countries.