Lat long decimal problem

Hi Folks!

I have those columns “lat” and “long”, with values such as:

lat: -4817415
long: -66856307

The correct representations are:

lat: -4.817415
long: -66.856307

However, I couldn’t find a way to have those values as “numeric column type”.

Should I convert to string type and add “.” with a simple formula? Will this work at the map widget?

Thanks in advance!

Eduardo

Hi! It works as a string:


(Those are “açaís” at Amazon forest :slight_smile: )

But, will be nice to have a column type as “decimal coordinates”?

1 Like

Or user customizable custom fields?

Hummm… I couldn’t find it:

Please, what I’m missing?

Sorry, my fault. I was implicitly suggesting a new feature.
There are no custom fields available currently.

Ah! Perfect Emanuele. I agree! Thanks!

Hi @Eduardo_Dalcin.

Your intuition to use a formula is correct. There’s two ways to approach it, depending on whether you’d like to keep the original data formatted without decimals, or to replace/clean it with decimal numbers.

To keep it, you can just make a new, “Numeric” formula column and use the new column in the map widget. We can help you with writing the formula, but I suspect the AI Formula Assistant will do quite well if you ask it to take your original latitude and longitude values without decimals, and produce equivalent numbers, with the decimal in the right position. Feel free to give it a shot and we’re happy to help if it doesn’t produce the formula you’re looking for.

To clean/replace data in the original column, you can use a trigger formula that’s set to apply only to changes to the current field. That way, whenever you enter data into the cell without a decimal, it’ll automatically be cleaned and formatted with a decimal before it’s saved to the cell. The formula will be very similar to the one above, with the main difference being you’ll need to use the special value variable (i.e. the value being entered into the cell) instead of the original column.

George