cancel
Showing results for 
Search instead for 
Did you mean: 

ObjectListItem number rounding to whole number

0 Kudos

Hello,

Is there a way to show only whole number in the 'Number' part of ObjectListItem? As seen in the attached image the ObjectListItem always displays decimal values, for eg. 10.00 when the value supplied is 10. Is there a way to only show the whole numbers?

Regards, Viqar

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

I was able to figure out a fix for this. Attaching code for the benefit of anyone else who would face similar problem:

new sap.m.ObjectListItem({

            title: "{fullName}",

            icon: "{userImage}",

            description: "{descriptionText}",

            type: "Active",

           number: {

                parts: [{

                    path: 'awardAmount',

                    type: 'sap.ui.model.type.Integer'

                }],

               type: 'sap.ui.model.type.Integer',

                formatOptions: {

                    showMeasure: false

                }

            },

            numberUnit: "{currency}"

})

Answers (0)