Show TOC

Rating Indicator in TablesLocate this document in the navigation structure

You can add a read-only rating indicator in the list report or in a responsive table in the object page view.

The rating indicator allows you to visually represent the value of a field from the back-end system with the corresponding number of stars (configurable). This field can indicate, for example, a rating or classification for a specific object or item.

Decimal values are rounded up or down accordingly. If a value falls between x.25 and x.74, a half-star is displayed.
Figure 1: Rating Indicator in Table
Code Samples

Enable Rating Indicator

To add a rating indicator, add the type #AS_DATAPOINT to the relevant lineItem annotation and the @UI.dataPoint: {visualization: #RATING} annotation for the relevant field as shown below:
@UI.lineItem: {position:30, type:#AS_DATAPOINT}

@UI.dataPoint: {visualization:#RATING}

Product.Rating,

Define Maximum Number of Stars

By default, the rating indicator displays a maximum of five stars. If desired, you can change this by defining a different value for the targetValue property.

In the sample code below, the rating indicator is set up to display six stars:

@UI.lineItem: {position:30, type:#AS_DATAPOINT}
				
@UI.dataPoint: {targetValue: 6, visualization:#RATING}

Product.Rating,