Skip to main content
Question

Icon in field depending on another field value

  • April 5, 2017
  • 0 replies
  • 48 views

HI all, newbie question here, and something i cannot figure out.
I want to create a new field, but have it show a icon. But the icon will be different depending on another field for that entry. for example;

Field1                        Field2              
red                            shows image from example url1 https://images.url.com/red.png
blue                            shows image from example url2 https://images.url.com/blue.png
green                          shows image from example url3 https://images.url.com/green.png

So when looking at the first line, the field2 will show a red icon, as the field1 text matches 'red'

hope that makes sense, thanks.
This topic has been closed for replies.

HI Chris,

Please create a formula text field and turn on the Allow some HTML tags to be inserted option in the field.

Use this formula:

Case([Field1],"red", "<img src=\"https://images.quickbase.com/si/16/227-rect_red.png\"; title=\"red\">", 
"blue", "<img src=\"https://images.quickbase.com/si/16/230-rect_blue.png\"; title=\"blue\">",
"green","<img src=\"https://images.quickbase.com/si/16/228-rect_green.png\"; title=\"green\">")

Please let me know if you need any further help.

Thanks,
Gaurav

thanks both, i will give that a try and update you. much appreciated.

worked brilliantly, thanks both.