Copy link to clipboard
Copied
Hi,
Please help me with this one. I only want to display the decimal value.
Example: 1.23 it should show 23 only
Thanks in advance
As 'Custom format script' use this:
var str = event.value;
var sp = str.split(".")[1];
if(event.value)
event.value = sp;
Copy link to clipboard
Copied
You want to show it in a same field where value is, or in another field? Do you want decimal to be just format or actual value?
Copy link to clipboard
Copied
I would like it to be shown on the same field where the value is and be just format.
Thnx for the quick reply...
Copy link to clipboard
Copied
As 'Custom format script' use this:
var str = event.value;
var sp = str.split(".")[1];
if(event.value)
event.value = sp;
Copy link to clipboard
Copied
Thank you very much!!! that's what I needed.
Copy link to clipboard
Copied
I would like to ask a follow up question. What do I add to make it show only 2 digits.
Copy link to clipboard
Copied
Change last line to this:
event.value = sp.slice(0,2);
Copy link to clipboard
Copied
Thank you very nuch.