July 23, 200817 yr Hi, I'm fairly new to Filemaker, so I might have overlooked the obvious... My goal is: to be able to have the user enter a set of numbers that will generate an output like this: 123°456'789" This will be used to display coordinates (lat/long). So far I can get the "123°" part to work but filemaker won't let me use ' or " as characters and not code. Is there a work around or will I just have to make that a manual step? Thank you. Megan Edited July 23, 200817 yr by Guest
July 23, 200817 yr Author update. Due mainly to reading the articles on this site I can now get most of what I want using this code: LatitudeDegree&"°" & LatitudeMin&""" Which outputs 123°456" I still need the ' and the backslash trick doesn't work. maybe I'll try the global work around that was suggested in the article I read.
July 24, 200817 yr Hi you can try this calc ( result text ) Case( not IsEmpty ( LatitudeDegree ) ; LatitudeDegree & "°" ) & Case( not IsEmpty ( LatitudeMin ) ; LatitudeMin & "'" ) & Case( not IsEmpty ( LatitudeSec ) ; LatitudeSec & """ ) BTW: I'm curious to know which place has a Latitude of 123°456'789" ?
July 24, 200817 yr Hmmm, it works Daniele but what if the field is left blank? I used to work for a group of surveyors and if the seconds are blank, it should appear as: 45°33'0" and yours appears as 45°33'. It may be fine in some locals but I wanted you to be aware of fact that most times, all three numbers should have a value. Also, these are certainly numbers even if the calculation field (result) is text. So you can skip the IsEmpty() and instead quicken it a bit with boolean as: Case ( LatitudeDegree ; LatitudeDegree ; 0 ) & "°" & Case ( LatitudeMin ; LatitudeMin ; 0 ) & "'" & Case ( LatitudeSec ; LatitudeSec ; 0 ) & """ LaRetta
July 24, 200817 yr I just looked it up. There is point where it says minutes or minutes & seconds can be omitted. I KNEW those guys I worked with were flakes!! Ha ha!
July 24, 200817 yr Author Thanks for the help. This is the first FM file I've built from scratch so I'm trying to keep up with how I envision it working! Do any of you know a good quick reference source for the FM calculations? The help files really aren't as helpful as I though they'd be. I'm pretty sure it is just example numbers 123 456 789 Yep I just used digits 1-9 since it was easy. My problem has been made more complex because the group i work with uses three formats to record their lat and long (DMS, DD & DM). I was trying to program a check box to activate one or the other but have fallen back to "buttons" for now...
July 25, 200817 yr Do any of you know a good quick reference source for the FM calculations? FMForums My problem has been made more complex because the group i work with uses three formats to record their lat and long (DMS, DD & DM) From: http://www.reality-xp.com/community/articles/1004.htm The Latitude and Longitude typically come in 3 flavors and you must be sure which system you are using again in order to get the most accurate results. For an example we will use the co-ordinates for KMIA airport. Degrees-Minutes-Seconds (DMS) 25 ° 47 ' 35.7 " N - 80 ° 17 ' 26 " W Decimal Degrees (DD) 25° 47.595' N - 80° 17.43333' W Decimal Minutes (DM) 25 ° 793250 ' – (-)80 ° 290556 ' (In DM the – sign denotes either South or West) To convert DMS to DD take the seconds and divide by 60 – 37.7/60=. 595 To convert DD to DMS take the numbers after the decimal point and multiply by 60 – .595 X 60 = 35.7 To convert DMS to DD take the minutes and divide by 60 and the seconds and divide by 3600 47/60=.7833333 and then 35.7/3600=.0099166 and add the two results together for a total of .7932499 or .793250 To convert DM to DD take the numbers after the degrees and multiple by 60 – .793250 X 60 = 47.595
July 25, 200817 yr I'm pretty sure it is just example numbers 123 456 789 Uhh ! The power of those "special characters"... I didn't see the progression ???
July 25, 200817 yr Author Thanks Raybaudi, but I was already aware of how to convert between the three formats. My conundrum is that I'm making specimen labels, not using the coordinates in formulas. I think I may have to just make a static text box and let the user format it, oh well. So much for trying to do it the "fancy" way! As for the quick reference, I was referring more to a "cheat sheet" type format than a database of information. Digging around in forums for the "right" thing can take a while and it's nice to have a list-format.
July 27, 200817 yr As for the quick reference, I was referring more to a "cheat sheet" type format than a database of information. If you want a handy reference to calculations, script-steps, error codes and much, MUCH more then I can HIGHLY suggest The Everything Reference. I keep it beside me and never leave home without it either. Again, thank you Andy and Stephen for making this available. I like it so much more than the large wall poster because it travels although I keep copies on my desks as well! Also don't forget that FileMaker Help can be helpful. There is also Function Bot's forum here (top of Forums section called Function of the Day). But The Everything Reference is brilliant!!
Create an account or sign in to comment