Hi Brenda,
We're on 8.2 so hopefully my answer will be accurate as I'm uncertain if you have features in 2020 that I don't have in my version.
As an Integer or Big Integer, only numbers are available to you with no other letters or symbols. As long as you're using integers in any way, you won't be able to use commas.
My Recommendation:For our Price Repository, we use the
Currency Data Type which I believe
(Tech People... make sure I'm accurate here) changes the INT values to a FLOAT value. This allows for fractional values which would allow for the use of a decimal point. Although this
does not address your issue with commas in the UI, I believe that it's the most appropriate Data Type for your values above. When we export our values, we use VTL to add commas to the values in a file (spreadsheet or CSV). We also have our web sites automatically add them through the formatting of the site itself so that they are displayed properly for our web audience.
If You Really Need Commas:My solution for adding commas to the UI values is to switch the values to VARCHAR and put logic in place using a rule to add a comma every three digits.
Here is the problem though... if you change the values in Price to VARCHAR, you're opening yourself up to the possibility of having characters you don't want in your Price Repository.
I DO NOT RECOMMEND THIS OPTION.
A third option would be this and it would probably require development on Winshuttle's part:
Have an option in the View Preferences to view INT and BIGINT values with formatting.
You could have Display Options like this:
- Raw: See data as it truly is.
- Formatted: See data in the View Preference based on set parameters that could change how the UI displays the values. In your case, a BIGINT value would stay a BIGINT in the data but your UI could display those numbers with both decimals and commas should you want (similar to how Excel displays currency options).
This does bring up questions for the EnterWorks team though: @David Howard
- Why doesn't the CURRENCY data type include the option to add commas? Could you have a check box in the Detail Attribute Details in Profile which could add a comma into the value?
- What is the difference between CURRENCY and DECIMAL data types? They essentially have the same options in the UI.
- Is the addition of commas for CURRENCY possible in later versions and I'm just not aware of this yet? ;-)
I hope that this information is helpful.
Best regards,
Jon
------------------------------
Jon Varo | PIM Team Lead
Fender Musical Instruments | \+1 480 596 9690
------------------------------
Original Message:
Sent: 07-02-2020 08:51
From: Brenda Maxwell
Subject: Commas in Numeric Fields
Hi All! This is my first question post to the community. I hope I can get some help!
Can someone tell me how I can format BIGINT attributes to display in the UI with commas? (As you can see, we are using 2020).
------------------------------
Brenda Maxwell | Director Global Product Management
IDEA | \+1 703 562 4600
------------------------------