Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

EWM: How do I display a decimal field with a fixed number of decimal points?

I have several decimal attributes that are storing dollar values.  I want to be able to display those fields in the Work Item presentation layer as a fixed 2 point decimal.


For example:  

Current behavior:  value = 1.00  displayed as:  1
Desired:  value = 1.00  displayed as: 1.00

thoughts?

0 votes



One answer

Permanent link

 I gave it a shot. You have only one presentation kind, there are no obvious properties or flags that you can choose to change the behavior. So, I do not see a way to change the behavior to what you want.


It would be nice if there was some kind of format extension or scripting that would be possible. Feel free to write an enhancement request.

I have experimented with different ways of solving such a problem with out of the box capabilities. My approaches were to use string based attributes in several ways:
1. As attribute to store the data - this requires custom validators to make sure users do not type invalid data.
2. A calculated value as representation in a string attribute. I do not like adding artificial attributes that are potentially written too often, but it is a valid approach in some cases. This gets around typing invalid values to some extend, but shows you a different formatting.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,121
× 6
× 2

Question asked: Mar 16 '21, 10:43 a.m.

Question was seen: 1,355 times

Last updated: Mar 17 '21, 4:25 a.m.

Confirmation Cancel Confirm