NisargK0
(Nisarg Kothari)
May 3, 2024, 10:50am
1
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.
SohamM95
(Soham Majumdar)
May 3, 2024, 12:23pm
2
@NisargK0
You can use @RemoveTrailingZeros () function.
NisargK0
(Nisarg Kothari)
May 3, 2024, 12:30pm
3
@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.
NisargK0
(Nisarg Kothari)
May 3, 2024, 2:14pm
4
@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…
NisargK0
(Nisarg Kothari)
May 6, 2024, 7:50am
6
Thank you all.
I added a step to set the value as below, before loading the section, and that worked
@pxReplaceAllViaRegex (.TRMWeight,“0*$”,“”)
TanushaT
(Tanusha T N)
June 27, 2024, 10:40am
7
@NisargK0 Hi, where is this function called exactly?
NisargK0
(Nisarg Kothari)
June 27, 2024, 10:53am
8
@TanushaT
in defer load activity of the layout
SohamM95
(Soham Majumdar)
May 3, 2024, 1:59pm
9
@NisargK0
I tried in version 8.8. It works in decimal. PFA
SohamM95
(Soham Majumdar)
May 4, 2024, 4:48am
10
@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.
TanushaT
(Tanusha T N)
June 28, 2024, 4:29am
11
@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