You need to sign in to do that
Don't have an account?
Barry Taylor SwishClean
Using Visualforce pages to display a date specific field?
Hello,
I have what I think is a unique request from the executive management at my organization. They wanted me to build in a sales history displaying a specific account sales history Month to Date as well as display Last Year Month to Date.
This is not a problem and I created the individual fields for the historical sales information and it displays well.
What I woud like to do is create a Visual Force page that will display Month to Date Sales and the directly below I want to display the field that contains Last Year Sales Month to Date so the account managers can see the target or how they did with that account the year previous.
Is there some kind of formula that I can write that says if between April 1 to April 30 display Field April 2013, May 1 to May 30 display May 2013?
This is my current code... it is just a quick mock up very basic display of blocktables... nothing special.
Any input would be great thanks
<apex:page standardController="Account">
<b>Account Name:{!account.name}</b>
<apex:pageBlock >
<apex:pageBlockTable value="{!account}" var="ac">
<apex:column Value="{!ac.LY_Annual_Sales__c}"/>
<apex:column value="{!ac.GP__c}"/>
</apex:pageBlockTable>
<apex:pageBlockTable value="{!account}" var="ac">
<apex:column Value="{!ac.LY_Annual_Sales__c}"/>
<apex:column value="{!ac.GP__c}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
I have what I think is a unique request from the executive management at my organization. They wanted me to build in a sales history displaying a specific account sales history Month to Date as well as display Last Year Month to Date.
This is not a problem and I created the individual fields for the historical sales information and it displays well.
What I woud like to do is create a Visual Force page that will display Month to Date Sales and the directly below I want to display the field that contains Last Year Sales Month to Date so the account managers can see the target or how they did with that account the year previous.
Is there some kind of formula that I can write that says if between April 1 to April 30 display Field April 2013, May 1 to May 30 display May 2013?
This is my current code... it is just a quick mock up very basic display of blocktables... nothing special.
Any input would be great thanks
<apex:page standardController="Account">
<b>Account Name:{!account.name}</b>
<apex:pageBlock >
<apex:pageBlockTable value="{!account}" var="ac">
<apex:column Value="{!ac.LY_Annual_Sales__c}"/>
<apex:column value="{!ac.GP__c}"/>
</apex:pageBlockTable>
<apex:pageBlockTable value="{!account}" var="ac">
<apex:column Value="{!ac.LY_Annual_Sales__c}"/>
<apex:column value="{!ac.GP__c}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
Came up with some different code using SOQL to help you.showing example with account created in sep 2013 and account created in sept 2014.This may exactly not solve your problem but definitely will give you idea as how to proceed with your problem.you definitely have to code for every month logic.i just hard coded the months.
may this code help you a bit.
regards
Nitesh
All Answers
You can use Rendered attribute in column tag and check your date values with IF condition
something like
Regards
Nitesh
Came up with some different code using SOQL to help you.showing example with account created in sep 2013 and account created in sept 2014.This may exactly not solve your problem but definitely will give you idea as how to proceed with your problem.you definitely have to code for every month logic.i just hard coded the months.
may this code help you a bit.
regards
Nitesh