February 16, 200718 yr 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.
February 16, 200718 yr 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.
February 16, 200718 yr 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")
February 19, 200718 yr Author Sorry about the lack of detail. It is an equation to change decimal Latitudes to degrees. Thanks for all the help
February 19, 200718 yr 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" ) )
February 19, 200718 yr The "list usage not allowed" means that the final statement before the close bracket "]" has a semicolon. Remove that semicolon.
Create an account or sign in to comment