Skip to main content
Question

Sting to Number

  • May 4, 2018
  • 5 replies
  • 135 views

Forum|alt.badge.img

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.

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.

5 replies

david_r
Celebrity
  • 8394 replies
  • May 4, 2018

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


Forum|alt.badge.img
  • Author
  • 15 replies
  • May 4, 2018

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.

 

 


Forum|alt.badge.img
  • Author
  • 15 replies
  • May 10, 2018

@daleatsafe any thoughts on this


takashi
Celebrity
  • 7843 replies
  • May 10, 2018
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.

 

 


david_r
Celebrity
  • 8394 replies
  • May 11, 2018
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: