You need to sign in to do that
Don't have an account?
Dmule
Image Formulas based on 3 Separate Pick list Values
HI,
I have been asked to build a formula field that gives and image (Traffic Light) that shows the lowest rating from 3 separate pick lists, Account Management Status, BDM Status and Partner Status, all have RED, GREEN & YELLOW as pick list values. So is 2 out of 3 are green but one us Yellow then my Image field would show YELLOW or the lowest rating of the 3 Picklists.
Thank you
See Below:
Tested using my own status values and it works
All Answers
This should do the job, obviously replacing the text values with whatever your image forumla is:
Hey mate do you mean something like this
IF( ISPICKVAL( Account_Management_Status__c , "Red", "/img/samples/light_red.gif) || ISPICKVAL( Business_Development_Status__c ,Red), "/img/samples/light_red.gif), ISPICKVAL( Partner_Management_Status__c, "Red", "/img/samples/light_red.gif, Red) ,Red)"
IF( ISPICKVAL( Account_Management_Status__c, "Yellow", "/img/samples/light_yellow.gif) || ISPICKVAL( Business_Development_Status__c ,Yellow), "/img/samples/light_yellow.gif), ISPICKVAL( Partner_Management_Status__c, "Yellow", "/img/samples/light_yellow.gif, Yellow) ,Yellow), "
IF( ISPICKVAL( Account_Management_Status__c , "Green", "/img/samples/light_Green.gif) || ISPICKVAL( Business_Development_Status__c ,Green), "/img/samples/light_green.gif), ISPICKVAL( Partner_Management_Status__c, "Green", "/img/samples/light_Green.gif, Green) ,Green), "
Yes but your IF statements are currently incorrect for example the first one:
should be:
The above should be correct but if you get any errors let me know as I have not fully awoken from the weekend yet.
Hope you are ready for another weekend, i finally was able to get back and try your formula, than you for that however it gives me text and not a traffic light image, and when I try to add IMAGE to the formula it gives me an error Error: Incorrect number of parameters for function IMAGE(). Expected 2, received 3, what am i missing?
Can you give me your entire code your using, the picklist api names, the location of the image files (full url please) and I'll see what I can do with that.
The formula is as you had it API Names Included, and I do not have a URL for the image, I thought the formula field "img/samples/light_red.gif would give the image?
IF( ISPICKVAL( Account_Management_Status__c , "Red") || ISPICKVAL( Business_Development_Status__c , "Red") || ISPICKVAL( Partner_Management_Status__c, "Red"), "/img/samples/light_red.gif" ,
IF( ISPICKVAL( Account_Management_Status__c, "Amber") || ISPICKVAL( Business_Development_Status__c ,"Yellow") || ISPICKVAL( Partner_Management_Status__c, "Yellow"), "/img/samples/light_yellow.gif",
IF( ISPICKVAL( Account_Management_Status__c , "Green") || ISPICKVAL( Business_Development_Status__c ,"Green") || ISPICKVAL( Partner_Management_Status__c, "Green"), "/img/samples/light_Green.gif", null)))
Thank you for your help
See Below:
Tested using my own status values and it works
Works a treat and thank you for all your help
Hi Sporter:
I have an issue which follows this one. I did define Color_green.gif with simiar code. The formula fields gest displayed perfectly in standard screen. However, when I tried to define a Visualforce, I get text values. FYI the code is here:
<apex:page standardController="Project__c" recordSetVar="projects">
<apex:pageBlock >
<apex:form id="theForm">
<apex:pageBlockTable value="{!projects}"
var="prj">
<apex:column value="{!prj.name}"/>
<apex:column headerValue="Scope">
<apex:outputField value="{!prj.Scope_Color__c}"/>
</apex:column>
</apex:pageBlockTable>
</apex:form>
</apex:pageBlock>
</apex:page>
Sorry forceone, visualforce and apex is out of my area (for the moment) and I'd not be able to assist you here, try over on the VF/Apex board in this forum.