Skip to main content
Question

Force Lat/Long in Decimal Degrees

  • November 22, 2023
  • 0 replies
  • 133 views

Forum|alt.badge.img+6

Hello,

Right now we have a text field for lat/long and would like to force users to only being able to put lat/long in decimal degrees instead of degrees, min and seconds. We are also open to just some sort of message displaying if they put it in the wrong format. We would like the field to remain a text field and not a numeric one. 



This topic has been closed for replies.

Forum|alt.badge.img+9
  • Registered
  • November 22, 2023

Since you're using text, which I would recommend keeping as well, you'll have to use form rules or custom data rules to enforce the kind of entry you're looking for. The easiest method might be to have some kind of formula checkbox that checks to see if your lat/long fields have a space in there - a simple contains([Lat], " ") will do it, since a numeric lat/long should have no spacing to it. You can display a warning or clear out the value and make them re-enter. Not perfect, but a simple reminder for your users. Depending on your level of precision that users are entering lat/long - you could also cap the length of the field. Setting it to 11 characters max for example would allow you to enter a -100.000000 type value, so 6 decimal points of precision. Doesn't do all that much, just another potential enforcement mechanism. 



------------------------------
Chayce Duncan
------------------------------