Hi All...
So I have a UX with a calculated field. The field is dollar field that is set to round precision 2 with the round directed set to default.
Screenshot from 2018-05-09 13-40-46.png
The calculated field expressions is:
if(STAMPING_FEE>1.00,(FEE_AMOUNT*TAX_PERCENT_AMNT)+STAMPING_FEE,FEE_AMOUNT*(TAX_PERCENT_AMNT+STAMPING_FEE))
This formula works with one exception. If the dollar amount calculated comes to $1.88. You save the record. Close the UX that has the calculated field on it. Re-open that UX. It now rounds the amount from a 1.88 to a 1.90 and makes the UX dirty.
Now...I don't know if it is the calculated field expression that is running again when the UX is opened or it is rounding again when it is open.
My thought process was to maybe take the calculated filed expression off and put it on a button but I cannot figure out how to get that to work. I've tried many variations of this:
Been trying to follow the examples on W3 Schools...
Any ideas or suggestions are welcome.
Running version v4.5.2
Version: 12.4.5.2, Build 4770
Build 5018
Thanks
Joe
So I have a UX with a calculated field. The field is dollar field that is set to round precision 2 with the round directed set to default.
Screenshot from 2018-05-09 13-40-46.png
The calculated field expressions is:
if(STAMPING_FEE>1.00,(FEE_AMOUNT*TAX_PERCENT_AMNT)+STAMPING_FEE,FEE_AMOUNT*(TAX_PERCENT_AMNT+STAMPING_FEE))
This formula works with one exception. If the dollar amount calculated comes to $1.88. You save the record. Close the UX that has the calculated field on it. Re-open that UX. It now rounds the amount from a 1.88 to a 1.90 and makes the UX dirty.
Now...I don't know if it is the calculated field expression that is running again when the UX is opened or it is rounding again when it is open.
My thought process was to maybe take the calculated filed expression off and put it on a button but I cannot figure out how to get that to work. I've tried many variations of this:
Code:
var stampfee={dialog.Object}.getValue('STAMPING_FEE'); var feeamnt={dialog.object}.getValue('FEE_AMOUNT'); var taxprcnt={dialog.object}.getValue('TAX_PERCENT_AMNT'); if(stampfee>1.00) {calc= (feeamnt*taxprcnt)+stampfee} else if(stampfee<1.00) {calc feeamnt*(taxprcnt+stampfee)}; //var calc=if(stampfee>1.00,(feeamnt*taxprcnt)+stampfee,feeamnt*(taxprcnt+stampfee)); {dialog.Object}.setValue('TOTAL_FEE',calc );
Been trying to follow the examples on W3 Schools...
Any ideas or suggestions are welcome.
Running version v4.5.2
Version: 12.4.5.2, Build 4770
Build 5018
Thanks
Joe
Comment