Reputation: 1
I have a financial field with decimals present in it. And would like to show the whole number value always but as I click a button or action specific to it, it should show me the decimal value for it.
Upvotes: 0
Views: 1732
Reputation: 134
Steps to convert Decimal to whole number:
Go to value and right click on the value and go into format .
Refer this link:https://i.sstatic.net/f6ysv.png
After going format Go to fields you want to change format and select it
Refer this link:https://i.sstatic.net/nQ9No.png
After click on fields Go to Numbers and change format as per your requirement.
Refer this link:https://i.sstatic.net/2zS2L.png
Note: Refer links to get details of how to do.
Upvotes: -1
Reputation: 1529
What you can do is create a parameter as_decimal
with two possible values True and False.
You then create a calculated field which is an if-else
where in the if expression you check whether the as_decimal
parameter is set to True.
If this results to true then you 'return' the decimal value else you return the whole value.
Instead of the current value you are showing, you should use the calculated expression.
Upvotes: 2