You need to sign in to do that
Don't have an account?
Chad Ritchie
Visualforce Merge Field Question
Hey guys,
I'd like to have the following formula (which pulls in a heatmap of NY from the Documents Tab)
<apex:page standardcontroller="Contact" showHeader="false">
<apex:image id="NY" value="{!'/servlet/servlet.FileDownload?file=0F01k00000002Wn'}" width="1920" height="940"/>
</apex:page>
use an if statement/merge field to verify that the record's state is actually NY. For example, I'd like in Excel terms to do if(contact.state__c = "NY", <apex:image id="NYJan19" value="{!'/servlet/servlet.FileDownload?file=0F01k00000002Wn'}" width="1920" height="940"/> ,"")
The reason being that I plan on having an image for every state so I need to merge in the record's state field so I can properly match them. Otherwise this would require 50 visualforce pages.
Thanks!!
I'd like to have the following formula (which pulls in a heatmap of NY from the Documents Tab)
<apex:page standardcontroller="Contact" showHeader="false">
<apex:image id="NY" value="{!'/servlet/servlet.FileDownload?file=0F01k00000002Wn'}" width="1920" height="940"/>
</apex:page>
use an if statement/merge field to verify that the record's state is actually NY. For example, I'd like in Excel terms to do if(contact.state__c = "NY", <apex:image id="NYJan19" value="{!'/servlet/servlet.FileDownload?file=0F01k00000002Wn'}" width="1920" height="940"/> ,"")
The reason being that I plan on having an image for every state so I need to merge in the record's state field so I can properly match them. Otherwise this would require 50 visualforce pages.
Thanks!!
Try the below option. hopefully, it works for you.
--> use rendered attribute.
<apex:page standardcontroller="Contact" showHeader="false">
<apex:image id="NY" rendered="{!Contact.State__c == 'NY'}" value="{!'/servlet/servlet.FileDownload?file=0F01k00000002Wn'}" width="1920" height="940"/>
</apex:page>
Thanks,