cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Format numbers in grid

egolindano
7-Bedrock

Format numbers in grid

Hi. I'm currently trying to "format" a float number in a grid column and  use spanish decimal and thousands separators. Ex: 1.234.567,89 .

is there any way on TWX  to add that format ?  I created a service which format the number, but returns a string, so if I try to sort that column later it doesn't sort "correctly".

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
posipova
20-Turquoise
(To:egolindano)

You could try going the localization route. To learn more about using localization tables please  refer to Article Viewer | PTC

Please note that numeric translation currently is not fully functional/still undergoing development.

For the procedure itself, however, please refer to the following article:

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS241828&lang=en_US

Particularly to this section:

  1. 1. Specify format for numeric display here, e.g. 0.00 if two decimal places are desired
    • Can also use localization tokens here for dates, but localization tokens should NOT be used here for swapping the decimal symbol (which will happen automatically)
    • Localization token
      • If in one language "100,000.43" is desired and in another "100000,43" is desired, then an additional localization token will need to manually be added
      • Default value in this example would be "0,000.00", and "0000.00" would go in the localization table
      • Note that both formats have decimal points where one wants a comma; this is because the substitution of this symbol will be handled automatically by the other two tokens added in these steps
  2. 2. In desired localization table, find the "decimal" and "thousands" tokens
  3. 3. Specify the alternative for these in the table, e.g. "," for "decimal" (which is "." by default)

In other words, you would need to change decimal token to “,”  then thousands token to “.” And then set number format  token to 0,000.00 (because the other two tokens will take care of the symbols).

View solution in original post

3 REPLIES 3
posipova
20-Turquoise
(To:egolindano)

You could try going the localization route. To learn more about using localization tables please  refer to Article Viewer | PTC

Please note that numeric translation currently is not fully functional/still undergoing development.

For the procedure itself, however, please refer to the following article:

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS241828&lang=en_US

Particularly to this section:

  1. 1. Specify format for numeric display here, e.g. 0.00 if two decimal places are desired
    • Can also use localization tokens here for dates, but localization tokens should NOT be used here for swapping the decimal symbol (which will happen automatically)
    • Localization token
      • If in one language "100,000.43" is desired and in another "100000,43" is desired, then an additional localization token will need to manually be added
      • Default value in this example would be "0,000.00", and "0000.00" would go in the localization table
      • Note that both formats have decimal points where one wants a comma; this is because the substitution of this symbol will be handled automatically by the other two tokens added in these steps
  2. 2. In desired localization table, find the "decimal" and "thousands" tokens
  3. 3. Specify the alternative for these in the table, e.g. "," for "decimal" (which is "." by default)

In other words, you would need to change decimal token to “,”  then thousands token to “.” And then set number format  token to 0,000.00 (because the other two tokens will take care of the symbols).

Hi, Polina. Really thanks for your comment, it was really helpful i could achieve what i was looking for

posipova
20-Turquoise
(To:egolindano)

Absolutely! Glad you were able to achieve the result.

Top Tags