How to configure a conditional expression to display images in a List

Version 1


    In the configuration screens of a List/Grid, it is possible to set a column to render as an image. There is an expression editor available, and the online Help indicates that images can be set to display conditionally based on the value of each record in the column, but the syntax to configure the expression is not clear.



    Here's an example of how the conditional syntax works:

    $(if Status == "Active" then "green_light.png" else "yellow_light.png")

    If you have more than two images, the Case expression is simpler than nested If expressions; for example:

    $(case Status
      when "Logged" then "logged.png" 
      when "Active" then "active.png" 
      when "Waiting for Customer",   "Waiting for Resolution", "Waiting for 3rd Party"  then "waiting.png" 
      when "Closed" then "closed.png" 
      else "other.png")

    The list of  images can be viewed, elected from, or added to using the Image Manager link at the bottom of the Expression configuration window.