Solved

Add a dot to the last three numbers

  • 19 November 2021
  • 8 replies
  • 3 views

Badge +4

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

icon

Best answer by nielsgerrits 19 November 2021, 11:52

View original

8 replies

Userlevel 6
Badge +33

Devide it by 1000.

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

Badge +4

oh that was very simple what I was thinking.

thanks alot @nielsgerrits​ 

Badge +4

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

Userlevel 6
Badge +33

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

Badge +4

@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

Userlevel 1
Badge +21

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

Userlevel 6
Badge +33

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

 

Badge +4

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

 

Reply