Format numbers in grid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Solved! Go to Solution.
- Labels:
-
Mashup-Widget
-
Troubleshooting
- Tags:
- grid widget
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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. 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. In desired localization table, find the "decimal" and "thousands" tokens
- 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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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. 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. In desired localization table, find the "decimal" and "thousands" tokens
- 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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi, Polina. Really thanks for your comment, it was really helpful i could achieve what i was looking for
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Absolutely! Glad you were able to achieve the result.