Skip to main content
Solved

Add a dot to the last three numbers

  • November 19, 2021
  • 8 replies
  • 21 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

arash_hokm wrote:

@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)

 

View original
Did this help you find an answer to your question?

8 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

Devide it by 1000.

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


arash_hokm
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • 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
  • November 19, 2021
arash_hokm wrote:

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+54
arash_hokm wrote:

@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
  • November 19, 2021
arash_hokm wrote:

@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+39
  • Influencer
  • November 19, 2021
arash_hokm wrote:

@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+54
  • Best Answer
  • November 19, 2021
arash_hokm wrote:

@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
  • November 19, 2021
arash_hokm wrote:

@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 :)

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings