Skip to main content
Question

Why can't I just assign a data type to a field?!

  • January 29, 2020
  • 4 replies
  • 60 views

Forum|alt.badge.img

I'm having trouble with a relatively simple task - I want a field to be a specific data type (DOUBLE). The source for the values is a text field with a number (comma separator). However no matter what I try (e.g. creating a brand new field with @Evaluate(@double(@Value(MYTEXTFIELD))) or replacing comma with dot beforehand), it ends up as (as seen by ArcMap) text. StringFormatter didn't work either: the decimal option gives me (textual) scientific notation - yuck! Give me proper decimals or give me DEATH!

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

erik_jan
Contributor
Forum|alt.badge.img+26
  • Contributor
  • January 29, 2020

This has been suggested in this idea:

https://knowledge.safe.com/content/idea/33211/set-data-type-option-within-the-attributemanager.html

Please it up to get the functionality in a next release.


Forum|alt.badge.img

This has been suggested in this idea:

https://knowledge.safe.com/content/idea/33211/set-data-type-option-within-the-attributemanager.html

Please it up to get the functionality in a next release.

Done! I forgot about changing the type in the writer. This does work however FME seems to automatically round on the sixth decimal place no matter what length and precision I set. Guess I'll leave it as text and fix the format in ArcMap.


david_r
Celebrity
  • January 30, 2020

Done! I forgot about changing the type in the writer. This does work however FME seems to automatically round on the sixth decimal place no matter what length and precision I set. Guess I'll leave it as text and fix the format in ArcMap.

I doubt that FME is rounding the decimals, it is probably either

a) the storage data type that doesn't support more than 6 significant digits, e.g. fixed-precision datatypes such as "decimal(12,6)"

b) or the on-screen representation in ArcMap, where the decimals are rounded to the 6th position for legibility.

You can test the hypothesis by re-reading the data from your File Geodatabase using FME and checking the decimal values.


Forum|alt.badge.img

I doubt that FME is rounding the decimals, it is probably either

a) the storage data type that doesn't support more than 6 significant digits, e.g. fixed-precision datatypes such as "decimal(12,6)"

b) or the on-screen representation in ArcMap, where the decimals are rounded to the 6th position for legibility.

You can test the hypothesis by re-reading the data from your File Geodatabase using FME and checking the decimal values.

Dang, you're right. Map defaults to 6 no matter what the input says, but that can be changed.