0
IF((OR(NAV_Customer_ID__c = TEXT(BLAVE1),TEXT(BLAVE2),TEXT(OVECO2),TEXT(BLAVSP)), IMAGE("/servlet/servlet.FileDownload?file=0151A00000354E7", "") , ""))

Error : Syntax error. Missing ')'

I want to display an image if the field NAV Customer ID displays one of the values above. How can I fix my formula?

4 Answers 4

2

You should use the CASE function here, as it optimizes compile size.

IF(
    1 = CASE(NAV_Customer_ID__c,
        "Value A", 1,
        "Value B", 1,
        "Value C", 1,
        0
    ),
    IMAGE(...),
    ""
)

Note that you specify text values by wrapping them in quotes (single or double quotes work equally well).

1
IF(OR(NAV_Customer_ID__c = TEXT(BLAVE1),
NAV_Customer_ID__c = TEXT(BLAVE2),
NAV_Customer_ID__c = TEXT(OVECO2),
NAV_Customer_ID__c = TEXT(BLAVSP)), 
IMAGE("/servlet/servlet.FileDownload?file=0151A00000354E7", "") , "")

Above formula should work.

0

I think this is what you're looking for:

IF(OR(NAV_Customer_ID__c = TEXT(BLAVE1),NAV_Customer_ID__c = TEXT(BLAVE2),NAV_Customer_ID__c = TEXT(OVECO2),NAV_Customer_ID__c = TEXT(BLAVSP)), IMAGE('/servlet/servlet.FileDownload?file=0151A00000354E7', '') , '')

But I think you will have to put the full url of the image in the IMAGE() tag.

0

IF(NAV_Customer_ID__c = 'BLAVE1' || NAV_Customer_ID__c = 'BLAVE2'|| NAV_Customer_ID__c = 'OVECO2'|| NAV_Customer_ID__c = 'BLAVSP', IMAGE("/servlet/servlet.FileDownload?file=0151A00000354E7", "") , "")

Changed to above and worked

1
  • 2
    That's really nice of you to read our answers. Commented Dec 28, 2016 at 16:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .