Topic
4 replies Latest Post - ‏2013-03-15T03:40:14Z by KaranBal
SystemAdmin
SystemAdmin
648 Posts
ACCEPTED ANSWER

Pinned topic Failed Type conversion for type NUMBER, because of comma and not a dot

‏2013-02-13T21:13:39Z |
Hi,

Something strange has happened on our testserver. For some reason it went down and after we brought it back up something had changed.
In our items we use Numbers with a precision of 2 and use the dot as a seperator and not a comma.
All editable numeric attributes are filled in correctly, but we also have some calculated attributes.

After the reboot all the calculations now have a comma as a separator and therefor the conversion failes for a numeric attribute.
So I have 2 questions.

1) is the decimal representation based on the language/local of the OS?
2) is there a way to change a setting in MDM for PIM (version 9.0) to use a specific seperator?

Part of the code:
var landedCost = 151.6371771885522 + 0.48 + 0.13;
res = reformatDouble(landedCost, 1, 2);
This has always worked and stopped now.

Thank you in advance
Han
Updated on 2013-03-15T03:40:14Z at 2013-03-15T03:40:14Z by KaranBal
  • KaranBal
    KaranBal
    108 Posts
    ACCEPTED ANSWER

    Re: Failed Type conversion for type NUMBER, because of comma and not a dot

    ‏2013-03-13T22:08:30Z  in response to SystemAdmin
    Hi Han,
    Yes, the separator is dependent n locale but not the locale of the OS. If you go to "Home" > "My Settings", you will see an option for "Locale for user interface display". If you set it to a English, you will see dot as a separator, but if you some of the other languages like French, German etc, you will see a comma instead. I am not sure if this has any effect on the database but the display is effected by this.
    • SystemAdmin
      SystemAdmin
      648 Posts
      ACCEPTED ANSWER

      Re: Failed Type conversion for type NUMBER, because of comma and not a dot

      ‏2013-03-14T04:19:40Z  in response to KaranBal
      Hi KaranBal,

      You are wrong. I tested with "Locale for user interface display" set to Russian. And I got dot in the output. So I think, it may depend on OS locale.
  • SystemAdmin
    SystemAdmin
    648 Posts
    ACCEPTED ANSWER

    Re: Failed Type conversion for type NUMBER, because of comma and not a dot

    ‏2013-03-14T13:09:04Z  in response to SystemAdmin
    Thank you for your responses, but i guess it is still not clear :)
    I will put it to answered but someone from IBM should show me some day how this works, since this should never go wrong.

    It might even be the local settings on the DB2 server. It should store always the same but show something different depending on locale.
    • KaranBal
      KaranBal
      108 Posts
      ACCEPTED ANSWER

      Re: Failed Type conversion for type NUMBER, because of comma and not a dot

      ‏2013-03-15T03:40:14Z  in response to SystemAdmin
      Han,
      You can always open a PMR and someone from L-2 support will be more than happy to assist you. If L-2 representative doesn't know the answer, then they will find the answer for you.

      Alexander,
      Please just call me just Karan.