在sharepoint的list中定义了一个Calculated (calculation based on other columns) 类型的column,需要自动根据条件显示相对应的图片。

在Formula 中输入了以下代码:

=IF([kpi status]="on time","/_layouts/p_w_picpaths/kpipeppers-0.gif",IF([kpi status]="delay","/_layouts/p_w_picpaths/kpipeppers-1.gif"))

 

在view时不显示图片显示的是url

 

将以上代码中图片名称的最后一个字母改为大写,问题解决:

=IF([kpi status]="on time","/_layouts/p_w_picpaths/kpipeppers-0.giF",IF([kpi status]="delay","/_layouts/p_w_picpaths/kpipeppers-1.giF"))