Integer values default to 0 decimals during View creation

JeRoen shared this question 8 months ago
Answered

Hello,

When building a view all integer fields (I have a lot) become an metric and have 2 decimals en 1000-seperator. I do understand why these become a metric (although in my case it is most of the type in fact a dimension) but I do not understand why they default to a 1000-seperator and 2 decimals. They are integers ... ? Now I have to change these settings for 80 plus fields and that is only in 1 view ... Many more to come.

Is there a way to have integers default to 0 decimals and no 1000-seperator applied?

Kind regards,

Jeroen

Comments (3)

photo
1

Hi Jeroen,

yes I see exactly what you mean! And I'm going to call it a defect because I found that back in 7.1 the default decimal places for an integer was 0 (strangely enough). I have raised product defect YFN-12781, of course I couldn't give it a high priority given the nature of the bug, however, it is there now and will get fixed in time.

To answer your question about "is there a way..."?

No, not via the UI, however, you could do so via the backend with the following queries:

UPDATE ReportFieldParameter 
SET ParameterValue = 0 
WHERE ParameterKey = 'DECIMALPLACES' 
AND EntityId IN 
    (
       SELECT FieldTemplateId 
       FROM ReportFieldTemplate 
       WHERE DataTypeCode = 'INTEGER'
     )


UPDATE ReportFieldParameter 
SET ParameterValue = 'false' 
WHERE ParameterKey = 'THOUSANDSEPARATOR' 
AND EntityId IN 
    (
       SELECT FieldTemplateId 
       FROM ReportFieldTemplate 
       WHERE DataTypeCode = 'INTEGER'
     )
That would modify all integer fields in all views. If that seems a little too drastic for you then just add your particular ViewId to the WHERE clause of the subquery (if you're not familiar with YF tables, you can determine the correct ViewId from the ReportView table, the view name is stored in the column called "ViewDescription")

After running the queries you will need to either restart Yellowfin to update the application's view cache, or (my preference) simply click the "Clear" button under the View Cache section of info_cache_enhanced.jsp as described in the following Knowledge Base article:

https://community.yellowfinbi.com/knowledge-base/article/how-to-avoid-having-to-restart-yellowfin-after-backend-modifications-to-the-yellowfin-database

One final note: As we remind all of our clients who are going to modify their Yellowfin configuration database via the backend....please don't forget to back it up immediately beforehand!


regards,

David

photo
1

Hello David,

Glad to hear that the expected way will return in a new version. For now I will use the work-around by manually altering the columns with the queries you provided.

Thanks,

Jeroen

photo
1

Hi Jeroen,

yes I would do the same if I had hundreds of columns to correct!

I hope you give the info_cache_enhanced.jsp a try, once you've got it in your ROOT folder it is much quicker and easier to use than restarting Yellowfin.

regards

David