Using a calculated value to show different pictures in a list

Today I created a list to show the status of some internal systems and services.  The idea is to have the value of the icon column change automatically when the value of status is changed, for example, from “Available to Unavailable”.  It is a simple list with 4 columns:

  • Service
  • Status
  • Details
  • Icon

The formula required is as follows:

=IF(Status=”Available”,”<img src=/SiteAssets/status_available.gif>”,IF(Status=”Issue”,”<img src=/SiteAssets/status_issue.gif>”,IF(Status=”Unavailable”,”<img src=/SiteAssets/status_unavailable.gif>”)))

Note: To get it to work I had to ensure the data type for the icon column was set to ‘Number’

[BlogBookmark] [Blogsvine] [del.icio.us] [Digg] [Facebook] [Furl] [Google] [LinkedIn] [MySpace] [Reddit] [Slashdot] [StumbleUpon] [Twitter] [Windows Live] [Yahoo!] [Email]