You need to sign in to do that
Don't have an account?
image picklist formula returns value, not image
The fromula seems to be working, but its displaying
"<img src="/servlet/servlet.FileDownload?file=0151600000QNE8V" alt=" " border="0"/>"
Instead of the image. Seems like a need URL reference?
This is the code on VF page to display picklist
This is the code on VF page to display image
https://c.na23.content.force.com/servlet/servlet.FileDownload?file=0151600000QNE8V
https://c.na23.content.force.com/servlet/servlet.FileDownload?file=0151600000QNE8f
"<img src="/servlet/servlet.FileDownload?file=0151600000QNE8V" alt=" " border="0"/>"
Instead of the image. Seems like a need URL reference?
This is the code on VF page to display picklist
<apex:outputField value="{!customo__c.Flag__c}" > <apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton" event="ondblclick" changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/> </apex:outputField>and field Flag__c is picklist "Green" , "Red"
This is the code on VF page to display image
{!customo__c.Flag_formula__c}This is the fromula (text) for field "Flag_formula__c"
IMAGE( CASE(Flag__c, "Green","/servlet/servlet.FileDownload?file=0151600000QNE8V", "Red","/servlet/servlet.FileDownload?file=0151600000QNE8f", ""),"")The images URL work
https://c.na23.content.force.com/servlet/servlet.FileDownload?file=0151600000QNE8V
https://c.na23.content.force.com/servlet/servlet.FileDownload?file=0151600000QNE8f
Ok Now I understand what is the issue. You just need to add an IF Condition to your formula to show image only if Flag is not blank.
Right now if have used text no image if Flag is ablank you could change according to your need.
This will fix your issue.
Thanks
Shashikant
All Answers
I order to show the Image on Visualforce Page you have to use outbput:Field like you have used for Flag__c field like below.
This will fix your issue.
Let me know if you still face issue.
Thanks
Shashikant
Ok Now I understand what is the issue. You just need to add an IF Condition to your formula to show image only if Flag is not blank.
Right now if have used text no image if Flag is ablank you could change according to your need.
This will fix your issue.
Thanks
Shashikant