
























12/1/2007 12:51:00 PM
Recently, I was working on a project that required the creation of an IT Project Management Site Template. I thought, hmm, pretty straight forward, but wait, I ran into an issue that I am positive, could have been solved in other ways (List Event Handler)
The requirement was to display an image based on a certain condition, and this condition had to do with lookup of other List Column values.
If you want to display images for a calculated column here are the steps you need to take:
Create a new Column of type Calculated - put some logic in it like so
=IF(AND(Impact="3",Probability="1"),"/_layouts/images/KPIDefault-1.giF",
IF(AND(Impact="3",Probability="2"),"/_layouts/images/KPIDefault-2.giF",
IF(AND(Impact="3",Probability="3"),"/_layouts/images/KPIDefault-2.giF",
IF(AND(Impact="2",Probability="1"),"/_layouts/images/KPIDefault-1.giF",
IF(AND(Impact="2",Probability="2"),"/_layouts/images/KPIDefault-1.giF",
IF(AND(Impact="2",Probability="3"),"/_layouts/images/KPIDefault-2.giF",
IF(AND(Impact="1",Probability="1"),"/_layouts/images/KPIDefault-0.giF",
IF(AND(Impact="1",Probability="2"),"/_layouts/images/KPIDefault-0.giF",
IF(AND(Impact="1",Probability="3"),"/_layouts/images/KPIDefault-1.giF","other")))))))))
NOTE: The Impact and Probability are columns in the SharePoint List. Based on this logic, I am re-using the images from the KPIs in MOSS and simply pointing to them.
And that's it! You now can output
images for your List. Here is how it looks 
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。