# Remove Trailing 0 after decimal

**URL:** <https://forums.pega.com/t/remove-trailing-0-after-decimal/6864>\
**Category:** User Experience\
**Tags:** 8-6-6, user-experience\
**Created:** [May 3, 2024, 10:50am UTC](https://forums.pega.com/t/remove-trailing-0-after-decimal/6864 "2024-05-03T10:50:35Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![NisargK0](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@NisargK0](https://forums.pega.com/u/NisargK0)\
**Post date:** [May 3, 2024, 10:50am UTC](https://forums.pega.com/t/remove-trailing-0-after-decimal/6864/1 "2024-05-03T10:50:35Z")

</div>

![image.png](https://pega1.discourse-cdn.com/pega/original/2X/2/21bb12267db74707a615aad9f4629c78259b7ab4.png)

Using a decimal property to store the required value.

When user tries to update the value, there are lot of trailing zeroes after decimal point which are useless.

Is there any way to remove the trailing zeroes without rounding or changing the value.

Eg.,

3.256555 should stay as it is.

3.0000000000 should appear as 3 or even 3.00 is fine.

---

<div class="post-metadata">

**Author:** ![SohamM95](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/sohamm95/32/4726_2.png) [@SohamM95](https://forums.pega.com/u/SohamM95)\
**Post date:** [May 3, 2024, 12:23pm UTC](https://forums.pega.com/t/remove-trailing-0-after-decimal/6864/2 "2024-05-03T12:23:36Z")

</div>

@NisargK0

You can use @RemoveTrailingZeros() function.

---

<div class="post-metadata">

**Author:** ![NisargK0](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@NisargK0](https://forums.pega.com/u/NisargK0)\
**Post date:** [May 3, 2024, 12:30pm UTC](https://forums.pega.com/t/remove-trailing-0-after-decimal/6864/3 "2024-05-03T12:30:06Z")

</div>

@SohamM95

I do not see any such function. Pega version 8.6.6

Also, this may not help as the property is decimal.

Zeroes are added after the property is set.

---

<div class="post-metadata">

**Author:** ![NisargK0](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@NisargK0](https://forums.pega.com/u/NisargK0)\
**Post date:** [May 3, 2024, 2:14pm UTC](https://forums.pega.com/t/remove-trailing-0-after-decimal/6864/4 "2024-05-03T14:14:12Z")

</div>

@SohamM95

The problem is when that decimal property is displayed on UI.

At the time of property-set, i have clean value.

---

<div class="post-metadata">

**Author:** ![RameshSangili](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/rameshsangili/32/23377_2.png) [@RameshSangili](https://forums.pega.com/u/RameshSangili)\
**Post date:** [May 3, 2024, 2:48pm UTC](https://forums.pega.com/t/remove-trailing-0-after-decimal/6864/5 "2024-05-03T14:48:14Z")

</div>

@NisargK0

I hope you can configure the decimal digits to be 2 on the presentation tab.

Also, Edit Input on the Property will also help you…

 ![decimal.jpg](https://pega1.discourse-cdn.com/pega/original/2X/d/dba8636e517b6c4be3be2e1212765af8d66115a8.jpeg)

---

<div class="post-metadata">

**Author:** ![NisargK0](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@NisargK0](https://forums.pega.com/u/NisargK0)\
**Post date:** [May 6, 2024, 7:50am UTC](https://forums.pega.com/t/remove-trailing-0-after-decimal/6864/6 "2024-05-06T07:50:44Z")

</div>

Thank you all.

I added a step to set the value as below, before loading the section, and that worked

@pxReplaceAllViaRegex(.TRMWeight,“0\*$”,“”)

---

<div class="post-metadata">

**Author:** ![TanushaT](https://avatars.discourse-cdn.com/v4/letter/t/eb8c5e/32.png) [@TanushaT](https://forums.pega.com/u/TanushaT)\
**Post date:** [June 27, 2024, 10:40am UTC](https://forums.pega.com/t/remove-trailing-0-after-decimal/6864/7 "2024-06-27T10:40:37Z")

</div>

@NisargK0 Hi, where is this function called exactly?

---

<div class="post-metadata">

**Author:** ![NisargK0](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@NisargK0](https://forums.pega.com/u/NisargK0)\
**Post date:** [June 27, 2024, 10:53am UTC](https://forums.pega.com/t/remove-trailing-0-after-decimal/6864/8 "2024-06-27T10:53:22Z")

</div>

@TanushaT

in defer load activity of the layout

---

<div class="post-metadata">

**Author:** ![SohamM95](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/sohamm95/32/4726_2.png) [@SohamM95](https://forums.pega.com/u/SohamM95)\
**Post date:** [May 3, 2024, 1:59pm UTC](https://forums.pega.com/t/remove-trailing-0-after-decimal/6864/9 "2024-05-03T13:59:47Z")

</div>

@NisargK0

I tried in version 8.8. It works in decimal. PFA

 ![zero.png](https://pega1.discourse-cdn.com/pega/original/2X/9/951e37c05b2b702e721956b403a2f581f975c2bb.png)

---

<div class="post-metadata">

**Author:** ![SohamM95](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/sohamm95/32/4726_2.png) [@SohamM95](https://forums.pega.com/u/SohamM95)\
**Post date:** [May 4, 2024, 4:48am UTC](https://forums.pega.com/t/remove-trailing-0-after-decimal/6864/10 "2024-05-04T04:48:18Z")

</div>

@NisargK0

In the presentation tab of the section element, you can configure till how many decimal places you want to display. You can also achieve this using edit input.

---

<div class="post-metadata">

**Author:** ![TanushaT](https://avatars.discourse-cdn.com/v4/letter/t/eb8c5e/32.png) [@TanushaT](https://forums.pega.com/u/TanushaT)\
**Post date:** [June 28, 2024, 4:29am UTC](https://forums.pega.com/t/remove-trailing-0-after-decimal/6864/11 "2024-06-28T04:29:16Z")

</div>

@NisargK0 we have the trailing zeros in the fields inside the table (not dynamic layout) where can this function be called from our table configurations
