Skwerrl Posted August 24, 2005 Posted August 24, 2005 This may be real easy to accomplish, but I'm not sure how. I am trying to input latitude and longitude coordinates into a field, and need to put °, ', " after the numbers. I want to make it so that when I create a Merge Field that the symbol will show up, but I don't want to the symbol to show up if there is no value in the box. Currently I have this as my field. Latitude: <>° <>' <>" it shows up as 34° 54' 1.52" when data is entered and ° ' " when nothing is there. My goal is for the symbols to not be on the form if numbers aren't inputted. Thanks for the help. Mike
sbg2 Posted August 24, 2005 Posted August 24, 2005 Creat a new unstored Text Calc field = Let([ L123 = Latitude & Latitude2 & Latitude3; Display = If (not IsEmpty(L123); Latitude & "" " & Latitude2 & "' " & Latitude3 & """)]; Display) Use the Calc field to display the 3 Latitudes.
Skwerrl Posted August 24, 2005 Author Posted August 24, 2005 (edited) Thank you very much, it worked great, but is there a way to make it so that Latitude, Latitude2, and Latitude3 are their own separate categories, so that if there is a value for 1 and 2, only those symbols will appear and not the symbol for 3. so if the value is 34° 55.55' there wont be the " after it. Thanks again. Mike Edited August 24, 2005 by Guest
sbg2 Posted August 24, 2005 Posted August 24, 2005 Well it may not be perfect depending on when you want the Calculation to display something. For example if all 3 Latitudes do not have a value then display nothing. In which case... If(IsEmpty(Latitude) or IsEmpty(Latitude2) or IsEmpty(Latitude3); "" ; Latitude & "" " & Latitude2 & "' " & Latitude3 & """) or If(not IsEmpty(Latitude) and not IsEmpty(Latitude2) and not IsEmpty(Latitude3); Latitude & "" " & Latitude2 & "' " & Latitude3 & """) would work better.
Skwerrl Posted August 24, 2005 Author Posted August 24, 2005 That takes all the data away if all three fields aren't entered, but is there a way to just take the field that has no data and hide it's symbol. I appreciate the help. Mike
Newbies yodd8 Posted August 24, 2005 Newbies Posted August 24, 2005 (edited) Hi Mike, Try a calculation field with the following: Case ( not IsEmpty ( Latitude ) ; Latitude & "º"; "" ) & Case ( not IsEmpty ( Latitude2 ) ; Latitude2 & "'"; "" ) & Case ( not IsEmpty ( Latitude3 ) ; Latitude3 & """; "" ) Hope that helps. Edited August 24, 2005 by Guest
Skwerrl Posted August 24, 2005 Author Posted August 24, 2005 Thanks for the help. This works, except if there are a couple of decimal places in the numbers, then the symbols are covered up and there are no spaces between numbers.
sbg2 Posted August 25, 2005 Posted August 25, 2005 Theres no need for the case statements, simply If ( not IsEmpty ( Latitude ) ; Latitude & "º ") & If ( not IsEmpty ( Latitude2 ) ; Latitude2 & "' ") & If ( not IsEmpty ( Latitude3 ) ; Latitude3 & "" ") should suffice. Make sure your calculation result returns text, not a number.
Skwerrl Posted August 25, 2005 Author Posted August 25, 2005 Thank you very much. It looks great now. I appreciate the help. I think I was forgetting to display it as text. Mike
Recommended Posts
This topic is 7098 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