Jump to content
Server Maintenance This Week. ×

Let Function


This topic is 6276 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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")

Link to comment
Share on other sites

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" )

)

Link to comment
Share on other sites

This topic is 6276 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.