Skip to main content
Solved

Add a dot to the last three numbers

  • November 19, 2021
  • 8 replies
  • 33 views

arash_hokm
Contributor
Forum|alt.badge.img+8

Hi FME Community,

I have a column with number. I want to add a dot to the last three numbers.

the pictures show what I expect as a result:what I expect as a resultwhat I have:

what I haveThanks in advance :)

Best answer by nielsgerrits

@nielsgerrits​ I have a problem with process execution. I actually have this value:

FME3 then I deleted points by using StringReplacer (up to here works very well) 

FME5and divided my value by 1000 by using AttributeCreator. Nevertheless, I get a warning and my column is not filled with anything. (I also converted my value to int64 but it didn't work either) (all lines also have values).

 as a warning I get:

AttributeCreator_2: Failed to evaluate expression '@real64(<null>/1000)'. Result is set to null

FME4

Then your formula is wrong. It needs to be

@Evaluate(@Value(col11)/1000)

 

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.

8 replies

nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • November 19, 2021

Devide it by 1000.

AttributeCreator, AttributeA = @Evaluate(@Value(AttributeA)/1000)


arash_hokm
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • 44 replies
  • November 19, 2021

oh that was very simple what I was thinking.

thanks alot @nielsgerrits​ 


arash_hokm
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • 44 replies
  • November 19, 2021

oh that was very simple what I was thinking.

thanks alot @nielsgerrits​ 

@nielsgerrits​ I have a problem with process execution. I actually have this value:

FME3 then I deleted points by using StringReplacer (up to here works very well)

FME5and divided my value by 1000 by using AttributeCreator. Nevertheless, I get a warning and my column is not filled with anything. (I also converted my value to int64 but it didn't work either) (all lines also have values).

as a warning I get:

AttributeCreator_2: Failed to evaluate expression '@real64(<null>/1000)'. Result is set to null

FME4


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • November 19, 2021

@nielsgerrits​ I have a problem with process execution. I actually have this value:

FME3 then I deleted points by using StringReplacer (up to here works very well)

FME5and divided my value by 1000 by using AttributeCreator. Nevertheless, I get a warning and my column is not filled with anything. (I also converted my value to int64 but it didn't work either) (all lines also have values).

as a warning I get:

AttributeCreator_2: Failed to evaluate expression '@real64(<null>/1000)'. Result is set to null

FME4

This means that the AttributeCreator finds a row with a null value, and null/1000 is invalid. Put a Tester between the StringReplacer and AttributeCreator_2, test Attribute has a value.


arash_hokm
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • 44 replies
  • November 19, 2021

@nielsgerrits​ I have a problem with process execution. I actually have this value:

FME3 then I deleted points by using StringReplacer (up to here works very well)

FME5and divided my value by 1000 by using AttributeCreator. Nevertheless, I get a warning and my column is not filled with anything. (I also converted my value to int64 but it didn't work either) (all lines also have values).

as a warning I get:

AttributeCreator_2: Failed to evaluate expression '@real64(<null>/1000)'. Result is set to null

FME4

@nielsgerrits​ I have already filtered all null, missing and empty attributes beforehand.

I watch my values ​​after StringReplacer and after AttributeCreator_2 by Inspector

FME10Inspector _3:

FME9inspector_2:FME7inspector_3:

FME8


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • November 19, 2021

@nielsgerrits​ I have a problem with process execution. I actually have this value:

FME3 then I deleted points by using StringReplacer (up to here works very well)

FME5and divided my value by 1000 by using AttributeCreator. Nevertheless, I get a warning and my column is not filled with anything. (I also converted my value to int64 but it didn't work either) (all lines also have values).

as a warning I get:

AttributeCreator_2: Failed to evaluate expression '@real64(<null>/1000)'. Result is set to null

FME4

Is it possible that there are records that just have .... entry so are not null at the stage of your tester but are null after the string replacer?


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • Best Answer
  • November 19, 2021

@nielsgerrits​ I have a problem with process execution. I actually have this value:

FME3 then I deleted points by using StringReplacer (up to here works very well) 

FME5and divided my value by 1000 by using AttributeCreator. Nevertheless, I get a warning and my column is not filled with anything. (I also converted my value to int64 but it didn't work either) (all lines also have values).

 as a warning I get:

AttributeCreator_2: Failed to evaluate expression '@real64(<null>/1000)'. Result is set to null

FME4

Then your formula is wrong. It needs to be

@Evaluate(@Value(col11)/1000)

 


arash_hokm
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • 44 replies
  • November 19, 2021

@nielsgerrits​ I have a problem with process execution. I actually have this value:

FME3 then I deleted points by using StringReplacer (up to here works very well)

FME5and divided my value by 1000 by using AttributeCreator. Nevertheless, I get a warning and my column is not filled with anything. (I also converted my value to int64 but it didn't work either) (all lines also have values).

as a warning I get:

AttributeCreator_2: Failed to evaluate expression '@real64(<null>/1000)'. Result is set to null

FME4

@nielsgerrits​ perfect. Thank you very much :)