Remove Trailing 0 after decimal

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.

@NisargK0

You can use @RemoveTrailingZeros() function.

@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.

@SohamM95

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

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

@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…

Thank you all.

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

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

@NisargK0 Hi, where is this function called exactly?

@TanushaT

in defer load activity of the layout

@NisargK0

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

@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.

@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