Skip to main content

Hello, we added some CF with percentage on Project
Margin; 4%

rate: 15,44%

When we calculate 4%-15,44% the result shoud be -11,44 

In the expression we added:

TO_CHAR(ROUND(Project_Cfp.Get_Cf$_Mci_Marge_Planned(v.PROJECT_ID) - Project_Cfp.Get_Cf$_Mci_Taux_Fg(v.PROJECT_ID), 2), 'FM9999990.0000')

 

But Aurena show -11% instead of -11,44 %

Where can we define the number of décimals on percentage fields ?

 

Any hint

@MCIPSTEV  this should be controlled from Account Settings if your CF data type is number/currency.

But in your expression I see you cast it to string (to_char). Any reason why you don’t leave it as a number?

In CF definition I would set it as Currecny so that Currency Format Settings would be applied: 

 

 


Hello, thanks for the tip, but this means that we can only decide of the number of decimals when the number format is Decimal an not percentage ?


Hello, 

When executing the query I have these results:

select ROUND(Project_Cfp.Get_Cf$_Mci_Marge_Planned('4H970245') - Project_Cfp.Get_Cf$_Mci_Taux_Fg('4H970245'),4) from DUAL
/*
OUTPUT: -0.1954
*/
select Project_Cfp.Get_Cf$_Mci_Marge_Planned('4H970245') from dual
/*
OUTPUT: 0
*/

select Project_Cfp.Get_Cf$_Mci_Taux_Fg('4H970245') from dual
/*
OUTPUT: 0.1954
*/

The entity expression

ROUND(Project_Cfp.Get_Cf$_Mci_Marge_Planned(v.PROJECT_ID) - Project_Cfp.Get_Cf$_Mci_Taux_Fg(v.PROJECT_ID),4)

The entity data type is a percentage:

And the result:
 

 

So in my opinion: the percentage does not show decimals for calculation. The decimals are only set on the user account for the currency type and not for percentage type.


Reply