Precisely Enterworks

 View Only
  • 1.  Commas in Numeric Fields

    Posted 07-02-2020 08:51
    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
    ------------------------------


  • 2.  RE: Commas in Numeric Fields

    Posted 07-03-2020 10:15
    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:
    1. Raw: See data as it truly is.
    2. 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
    1. 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?
    2. What is the difference between CURRENCY and DECIMAL data types? They essentially have the same options in the UI.
    3. 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
    ------------------------------



  • 3.  RE: Commas in Numeric Fields

    Posted 07-04-2020 16:28
    Hi Jon, this gives me some ideas, although I don't really like any of them.  Even though my example may have appeared to have to do with pricing, it is truly integer-type data, so I don't plan on changing the data types.  Technically, I don't need commas, but it would provide a much better user-experience to have commas.  Ultimately, this data is exported to excel, so users can format as they wish there.  But I will still rally Winshuttle to provide a formatting display option.

    Thanks for your feedback.
    Brenda

    ------------------------------
    Brenda Maxwell | Director Global Product Management
    IDEA | \+1 703 562 4600
    ------------------------------



  • 4.  RE: Commas in Numeric Fields

    Employee
    Posted 12-06-2020 23:59
    Brenda,

    A stop-gap solution would be to define display attributes that would be VARCHAR that would be pre-formatted with the commas (or any other formatting you wish) and then use VTL or Change Notification rules to update those values whenever the corresponding integers change.  The main drawbacks to this approach is that additional storage is needed along with the processing to maintain the display versions of the attributes.

    A similar approach has been taken to be able to define a summary tab in the detail editor that shows read-only copies of fields from other tabs all on a single tab.

    -Brian

    ------------------------------
    Brian Zupke | Senior Technical Support Engineer
    Winshuttle North America | 9099009179
    ------------------------------



  • 5.  RE: Commas in Numeric Fields

    Posted 07-08-2020 09:44
    Hi Jon and Brenda.  I think the questions posed by Jon at the end of his response are interesting...I'll do a quick scrub through development to see if there's a quick solution to this.  If not, I think we'll want to add those items into the product backlog for review.  I'll keep you both posted.

    ------------------------------
    David Howard | Solution Engineer
    Winshuttle North America | 240-534-3511
    ------------------------------



  • 6.  RE: Commas in Numeric Fields

    Posted 07-08-2020 10:05
    Thanks David!

    Please also ask Development about this part as well:

    "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:
    1. Raw: See data as it truly is.
    2. 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)."
    Best regards,
    -Jon

    ------------------------------
    Jon Varo | PIM Team Lead
    Fender Musical Instruments | \+1 480 596 9690
    ------------------------------



  • 7.  RE: Commas in Numeric Fields

    Posted 07-08-2020 14:18
    I second Jon's suggestion.

    ------------------------------
    Brenda Maxwell | Director Global Product Management
    IDEA | \+1 703 562 4600
    ------------------------------