Question

Sting to Number


Badge

I am trying to configure a means of converting a string such as 6.0.2 to a number 602 so that I can run it through a statistics calculator to get the Max. There may be only one entry, such as 6.0.2 or multiple entries such as 4.4.0, 6.0.0, 6.0.1 and 6.0.2. From either example I want to keep 602 and pass that as the Max attribute. That attribute is then tested to see if it is greater than or equal to 440. I am attaching pictures of my string replacer and statistics calculator. I have looked at a previous question "Converting Sting to Number" and tried some of those suggestions, even added a string formatter but still get an empty Max attribute.


5 replies

Userlevel 4

I tried to reproduce this issue with FME 2018.0 but it works as it should, my max value is 602 as expected:

Result:

Are you able to reproduce the issue in a minimal workspace (such as the attached template) and post it here?

string-to-num-stat.fmwt

Badge

I tried to reproduce this issue with FME 2018.0 but it works as it should, my max value is 602 as expected:

Result:

Are you able to reproduce the issue in a minimal workspace (such as the attached template) and post it here?

string-to-num-stat.fmwt

I'm using Version: FME(R) 2017.1.2.1 (20180117 - Build 17725 - WIN32)

 

Here is what I have:

 

With the Logger connected to StatisticsCalculator I get this:

 

With Logger connected to StringReplacer I get this:

 

Looks like it's something in the Calculator. But I can't figure it out.

 

 

Badge

@daleatsafe any thoughts on this

Userlevel 2
Badge +17
I'm using Version: FME(R) 2017.1.2.1 (20180117 - Build 17725 - WIN32)

 

Here is what I have:

 

With the Logger connected to StatisticsCalculator I get this:

 

With Logger connected to StringReplacer I get this:

 

Looks like it's something in the Calculator. But I can't figure it out.

 

 

I'm afraid that the StatisticsCalculator has broken internally. In other workspaces, does the StatisticsCalculator work as expected? If not, it could be worth to try reinstalling FME Desktop.

 

 

Userlevel 4
I'm using Version: FME(R) 2017.1.2.1 (20180117 - Build 17725 - WIN32)

 

Here is what I have:

 

With the Logger connected to StatisticsCalculator I get this:

 

With Logger connected to StringReplacer I get this:

 

Looks like it's something in the Calculator. But I can't figure it out.

 

 

Indeed, something really strange is going on:

 

Reply