+ Start a Discussion
KlivingstonKlivingston 

Case Statement to Display APEX Page

I've got the following APEX code to display a dashboard page:

 

<apex:page >
        <apex:pageBlock >
            <apex:iframe src="/01Z200000011vtB?isdtp=nv" scrolling="true" height="1588px" width="100%"/>
        </apex:pageblock>    
</apex:page>

 Is it possible to use a case statement here to choose which ID is populated here?  I.e. I've got 8 dashboards and I was wondering if you could use the {!$User.FirstName} global variable within a case statement to choose which dashboard to display?

 

Thanks!

akzeakze
Create a controller with a property for URL. You can generate the URL based on any condition you like.
And then use that URL in the Apex:iframe