SharePoint 计算列返回图片
Hi
i created a calculated column (Status) and want to display image against the value of a particular field(Impact) in the list.
it does not show me the image in the list, just shows the path of the image.
result is below;
Impact Status
1 /_layouts/images/kpidefault-0.gif
2 /_layouts/images/kpidefault-1.gif
3 /_layouts/images/kpidefault-2.gif
formula for the calculated column is
=IF(Impact="1","/_layouts/images/kpidefault-0.gif",
IF(Impact="2","/_layouts/images/kpidefault-1.gif",
IF(Impact="3","/_layouts/images/kpidefault-2.gif","Others")))
any idea how to fix this?
regards
You have to modify the 'Status' formula like below
="<DIV><IMG src='/_layouts/images/KPIDefault-"&IF(Impact="1","0.GIF",IF(Impact="2","1.GIF",IF(Impact="3","2.GIF","Chartreuse")))&"'></DIV>"
Then after add content editor webpart exactly after the list webpart, then add the below code snippet in the source editor of content editor webpart
i created a calculated column (Status) and want to display image against the value of a particular field(Impact) in the list.
it does not show me the image in the list, just shows the path of the image.
result is below;
Impact Status
1 /_layouts/images/kpidefault-0.gif
2 /_layouts/images/kpidefault-1.gif
3 /_layouts/images/kpidefault-2.gif
formula for the calculated column is
=IF(Impact="1","/_layouts/images/kpidefault-0.gif",
IF(Impact="2","/_layouts/images/kpidefault-1.gif",
IF(Impact="3","/_layouts/images/kpidefault-2.gif","Others")))
any idea how to fix this?
regards
You have to modify the 'Status' formula like below
="<DIV><IMG src='/_layouts/images/KPIDefault-"&IF(Impact="1","0.GIF",IF(Impact="2","1.GIF",IF(Impact="3","2.GIF","Chartreuse")))&"'></DIV>"
Then after add content editor webpart exactly after the list webpart, then add the below code snippet in the source editor of content editor webpart