Forum Discussion

HunterB's avatar
HunterB
Qrew Cadet
6 months ago

Force Lat/Long in Decimal Degrees

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. 



2 Replies

  • 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
    ------------------------------
    • HunterB's avatar
      HunterB
      Qrew Cadet

      The character length might work, it looks like they aren't putting spaces in so doesn't look like that would work. Thank you!