Jump to content

Inserting Symbols after text


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

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by Guest
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Newbies

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 by Guest
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 6679 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.