Decimal number separator format

Firekenny

New member
You are using DaDaBIK version 10.1-Manarola enterprise, installed on 03-10-2020 (installation code: 149385d97a1a893918), the latest version of DaDaBIK is 10.1-Manarola released on 03-09-2020

You are runnning the last release of DaDaBIK

In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enteprise to Platinum) please contact us.

System info
PHP Version: 5.6.40

mysql version: 5.6.46-log

Web server: Apache

Client: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Hello,
I am looking at a way to change the default display format for any field in a database/form that have big numbers (such as 1230000000).
I am trying to have a function so the display format is easier (such as 123 000 000 000 or 123,000,000,000) but can't find how to set this up in my hosted server. Also, this should apply to any Chart generated by Dadabik (either one off chart or through custom PHP file).
Thanks for your help.

Patrick
 

eugenio

Administrator
Staff member
Hello,
you can use a custom formatting function and format the numbers using, for example:
https://www.php.net/manual/en/function.number-format.php

This impacts on the results grid and details page; for the graphs you have to work on the settings of chart.js, the library we use for producing the graphs.

Best,
 

Firekenny

New member
Hi Eugenio,
Thanks for your feedback. Can you clarify in which dadabik software file should i add the custom formatting function to affect the result grid and the details page?

Thanks for clarifying.

Patrick

Note: hope you're safe in Italy and that your family is ok.
 

eugenio

Administrator
Staff member
Hello,
fortunately we are fine at the moment, thanks for having asked! I hope the same for you.

You should add your function in the general custom_functions.php file (check the content of the files, there are details about formatting functions).

You can also add the code in custom_formatting_functions.php, that is specific for custom formatting functions.

Best,
 

wejot

New member
You are using DaDaBIK version 10.1-Manarola enterprise, installed on 06.07.2020 (installation code: 157055f02d9c8558f1), the latest version of DaDaBIK is 10.1-Manarola released on 09.03.2020

You are runnning the last release of DaDaBIK

In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enteprise to Platinum) please contact us.

System info
PHP Version: 7.2.5

mysql version: 5.5.5-10.2.31-MariaDB

Web server: Apache




Hello Eugenio,

would you be so kind and post the code for a custom formatting function, which has to be inserted in the custom_formatting_functions.php, so that numbers return in the (German) format 123.456,87?

And is it possible to create a custom formatting function, that allowes to insert numbers with a German keyboard, which has the ";" as decimal seperator as standard?

Thanks a lot,

Werner
 
Top