You need to sign in to do that
Don't have an account?
geis6
Formula for image field...Help Please!
Hi,
I'm trying to create an image field that would populate the red flag image (/img/samples/flag_red.gif) when the boolean operator "HasCommentsUnreadBy Owner" is set to true. It can either have a no flag, or the green flag (/img/samples/flag_green.gif) when the operator is set to false.
I've tried a variety of "IF" formulas with no sucess actually displaying the image. I can get text to show up based on the formula's conditions.
Here are just some of the formulas I've tried:
IF(HasCommentsUnreadByOwner, "/img/samples/flag_red.gif", "/s.gif") - Doesn't wortk
IF(HasCommentsUnreadByOwner=True, "YES", "NO") - Works but this is not the image I prefer
IMAGE(
"/servlet/servlet.FileDownload?file=" &
IF(
HasCommentsUnreadByOwner=True,
"015R00000000iqS",
IF(
HasCommentsUnreadByOwner=False,
"015R00000000iqT"
) -----Syntax is wrong on this one, I thried adding the pictures to the docs tab.
Can somone lend assistance? Also, anyone have some good sources on formulas and sytax and learning them?
Cheers,
Ward
I'm trying to create an image field that would populate the red flag image (/img/samples/flag_red.gif) when the boolean operator "HasCommentsUnreadBy Owner" is set to true. It can either have a no flag, or the green flag (/img/samples/flag_green.gif) when the operator is set to false.
I've tried a variety of "IF" formulas with no sucess actually displaying the image. I can get text to show up based on the formula's conditions.
Here are just some of the formulas I've tried:
IF(HasCommentsUnreadByOwner, "/img/samples/flag_red.gif", "/s.gif") - Doesn't wortk
IF(HasCommentsUnreadByOwner=True, "YES", "NO") - Works but this is not the image I prefer
IMAGE(
"/servlet/servlet.FileDownload?file=" &
IF(
HasCommentsUnreadByOwner=True,
"015R00000000iqS",
IF(
HasCommentsUnreadByOwner=False,
"015R00000000iqT"
) -----Syntax is wrong on this one, I thried adding the pictures to the docs tab.
Can somone lend assistance? Also, anyone have some good sources on formulas and sytax and learning them?
Cheers,
Ward
I tried this formula:
IF( Case_Age__c > 20,
IMAGE("/img/samples/color_red.gif", "red", 30, 30),
IF( Case_Age__c > 10,
IMAGE("/img/samples/color_yellow.gif", "yellow", 30, 30),
IMAGE("/img/samples/color_green.gif", "green", 30, 30),
) )
Apparently, the syntax isn't even correct in te documentation, I get this error just pasting it into my field. "Error: Syntax error. Found ')' "
IF( HasCommentsUnreadByOwner = true,
IMAGE("/img/samples/color_red.gif", "red", 30, 30),
IF( HasCommentsUnreadByOwner = false,
IMAGE("/img/samples/color_green.gif", "green", 30, 30),
IMAGE(("/img/samples/color_yellow.gif", "yellow", 30, 30)
) )
I still got an error:
Error: Syntax error. Missing ')'
Cheers,
Ward
Edit, never mind I got it to validate. Notice extra "(" on 3rd IMAGE?
Message Edited by geis6 on 05-20-2008 04:39 PM
Here is the code with the extra "(" removed from the IMAGE tag:
IF( HasCommentsUnreadByOwner = True,
IMAGE("/img/samples/flag_red.gif", "red"),
IMAGE("/s.gif", "")
)
Cheers,
Ward