cancel
Showing results for 
Search instead for 
Did you mean: 

How to add an icon in Fiori Elements List Report?

cwolter90
Participant
0 Kudos

Dear SAP community,

I want to display an icon in a Fiori Elements List Report. The icon should be dynamically selected by the value of a field.

What I tried to achieve this:

  1. I added an additional string field to my odata-entity where I put the icon-uri (e.g. "sap-icon://error"). In the annotation modeler in Web IDE I referenced the new field in the propery IconUrl. Nothing happened.

  2. Writing a fixed icon uri into the IconUrl has also no effect.

  3. I tried to use the UI annotation "IsImageURL". This works with an url to an image, but not with an icon uri (e.g. "sap-icon://error").

It could be possible to inject a new column into the sap.m.table through an extension controller, but I guess this not the aim of a list report.

Any idea how to display an icon into the list report?

Best regards

Christian Wolter

Joseph_BERTHE
Active Contributor
0 Kudos

Hello

Did you find a solution ? I have the same issue.

Regards,

Joseph

former_member562471
Discoverer
0 Kudos

Hello,

i've the same problem with object pages.

I try to use the iconurl property for custom sap icons and other url icons, but it doesn't work.

It seems that the property "IconURL" has no effect.

Best Regards

Said

ThomasMundt
Participant
0 Kudos

Same here. How can one show/hide an icon depending on expression binding or evaluating logical expression, e.g. show icon, if certain property is set like so: toCategrories/Id === "ABC" icon ("sap-icon://accept") === visible?

akshaya_p
Contributor
0 Kudos

is this resolved? I'm also having the same issue

View Entire Topic
cwolter90
Participant

Hi,

the "solution" was extending the list report. You can inject a new column with the icon and a formatter.

Best regards

Christian

Joseph_BERTHE
Active Contributor
0 Kudos

Thanks cwolter90

0 Kudos

hi Christian,

I have the same requirement. Can you tell me the procedure to add the icon and formatter in the new column made by extension?

Regards,

Rashika

0 Kudos

Hi,

The best solution as mentioned is to use formatters in your xml views for the ui controls.

The table can be extended by using fragments. And the behavior of ui control within the table can be controlled dynamincally using formatters. Please refer link Step 23: Custom Formatters - Best link formatters

Regards,

Anirudh HA