Salesman0Gil Posted February 16, 2007 Posted February 16, 2007 Hello; I've tried the Let Function many times, but I always get strange errors, so I end up doing it a harder way. I have read the Filemaker Help, many times, and modeled my calcs after it. My newest one looks like: Let( [ H = Int ( Latitude ); M = Int((get_lat_long3-H)*60); S = Int(( Int((get_lat_long3-H)*60))-(Int((get_lat_long3-H)*60))*60);]; H&" Degrees"&M&" Minutes"&S&" Seconds) I keep getting "List Usage Is Not Allowed in This Calculation" When I remove the "[]" I get an error regarding "M" not bieng a field. Any help would be apperciated.
mr_vodka Posted February 16, 2007 Posted February 16, 2007 My newest one looks like: Let( [ H = Int ( Latitude ); M = Int((get_lat_long3-H)*60) ; S = Int(( Int((get_lat_long3-H)*60) )-(Int((get_lat_long3-H)* 60))*60)[color:red];]; H&" Degrees"&M&" Minutes"&S&" Seconds) First get rid of the extra semicolon. Second, why not just shorten it to: Let( [ H = Int ( Latitude ); M = Int ( ( get_lat_long3-H )*60 ); S = Int ( M - ( M*60 ) ) ]; H & " Degrees" & M &" Minutes" & S & " Seconds) BTW I havent tested your calc.
comment Posted February 16, 2007 Posted February 16, 2007 Hard to fix a calc without knowing what it's supposed to do.
Genx Posted February 16, 2007 Posted February 16, 2007 Plus the bottom quotes aren't making much sense either. e.g. 15 Degrees32 Minutes14 Seconds -- Except you haven't ended the quotes either. Let( [ H = Int ( Latitude ); M = Int ( ( get_lat_long3-H )*60 ); S = Int ( M - ( M*60 ) ) ]; H & " Degrees " & M &" Minutes " & S & " Seconds")
Salesman0Gil Posted February 19, 2007 Author Posted February 19, 2007 Sorry about the lack of detail. It is an equation to change decimal Latitudes to degrees. Thanks for all the help
comment Posted February 19, 2007 Posted February 19, 2007 Why does it need 2 input fields, then? (Latitude and get_lat_long3) To convert decimal latitude/longitude to degrees, minutes and seconds, you could use: Let ( [ t = Decimal * 3600 ; deg = Abs ( Hour ( t ) ) ; mm = Abs ( Minute ( t ) ) ; ss = Abs ( Seconds ( t ) ) ] ; deg & "º " & mm & "' " & ss & """ & Case ( Decimal < 0 ; " S/E" ; " N/W" ) )
Alan H Posted February 19, 2007 Posted February 19, 2007 The "list usage not allowed" means that the final statement before the close bracket "]" has a semicolon. Remove that semicolon.
Recommended Posts
This topic is 6548 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now