function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BobPBobP 

apex repeat doubling results

I have a visualforce page with apex:repeat and output panels. my issue is my page is displaying the same records twice and I'm not sure why. my code is below. Any help with this would be greatly appreciated.
User-added image
<apex:page standardcontroller="Account" renderas="pdf" extensions="AccountExtensionController" standardstylesheets="false" showheader="false" applyhtmltag="false">
<form >
<html xmlns="http://www.w3.org/1999/xhtml">
    <body style="color:#000000;border-style:solid; border-width:0px; width:85%; text-align:center">
    </body>

    <table align="center" width="85%" style="font-family: Arial, Helvetica, sans-serif;text-align:left;"
               cellpadding="2">
            
            <tr>
                <td colspan="4" style="font-size:12px; font-weight: normal">
                </td>
            </tr>
            
            <tr>
                <td colspan="4" style="font-weight:bold ; border-style:solid; border-width:1px;
                border-color:#000000;padding:3px;text-align:center;background-color:#B4C6E7">
                    SERVICE PARTNER DETAILS
                </td>
            </tr>

    </table>
            
    <table align="center" width="85%" style="font-family: Arial, Helvetica, sans-serif; text-align:left;"
               cellpadding="2">
            <tr>
                <td width="50%" align="left" style="color: #000000;text-align:left; border-left-style: solid; border-left-width: thin;
                border-left-color: #ffffff;font-style:normal; font-weight:normal;padding:3px;padding-top:10px">
                    <b>Company</b> {!Account.Name}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

                <td width="50%" align="right" style="color: #000000;text-align:left; border-right-style: solid; border-right-width: thin;
                border-right-color:#ffffff;font-style:normal; font-weight:normal;padding:3px;padding-top:10px">
                    <b>Office Phone</b> {!Account.Phone}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
            </tr>
            <tr>
                <td width="25%" align="left" style="color: #000000;text-align:left; border-left-style: solid; border-left-width: thin;
                border-left-color: #ffffff;font-style:normal; font-weight:normal;padding:3px">
                    <b>Contact</b> {!Account.Primary_Field_POC__r.FirstName} {!Account.Primary_Field_POC__r.LastName} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

                <td width="25%" align="left" style="color: #000000;text-align:left; border-right-style: solid; border-right-width: thin;
                border-right-color:  #ffffff;font-style:normal; font-weight:normal;padding:3px"><b>Cell Phone</b> {!Account.Secondary_Phone__c}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                <td width="25%" align="left" style="color: #000000;text-align:left; border-left-style: solid; border-left-width: thin;
                border-left-color: #ffffff;font-style:normal; font-weight:normal;padding:3px">
                    <b>Street Address</b><br/> {!Account.BillingStreet}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

                <td width="25%" align="left" style="color: #000000;text-align:left; border-right-style: solid; border-right-width: thin;
                border-right-color:#ffffff;font-style:normal; font-weight:normal;padding:3px"><b>Fax</b> {!Account.Fax}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
            </tr>
            
            <tr>
                <td width="25%" align="left" style="color: #000000;text-align:left; border-left-style: solid; border-left-width: thin;
                border-left-color: #ffffff;font-style:normal; font-weight:normal;padding:3px">
                    <b>City, St. Zip</b><br/> {!Account.BillingCity}, {!Account.BillingState} {!Account.BillingPostalCode}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
            <td width="25%" align="left" style="color: #000000;text-align:left; border-right-style: solid; border-right-width: thin;
                border-right-color: #ffffff;font-style:normal; font-weight:normal;padding-bottom:10px"><b>Email</b> {!Account.Primary_Field_POC__r.Email}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="4" style="font-weight:bold ; border-style: solid; border-width:1px;
                border-color: #000000;padding:3px;padding:3px;text-align:center;background-color:#B4C6E7">PER PUSH FEE SERVICE AGREEMENT</td>
            </tr>
    </table>
            
    <table align="center" width="85%" style="font-family: Arial, Helvetica, sans-serif;  text-align:left;"
               cellpadding="4">
          
            <tr>
               
            <td width="50%" align="left" style="color: #000000;text-align:center; border-right-style: solid; border-right-width: thin;
                border-right-color: #ffffff;font-style:normal; font-weight:normal;padding:3px">Per Push Fees: Includes all fees necessary to complete the services described in the scope of work for the event duration.  Hourly pricing applies only to extra services.
            </td>
            </tr>
    </table>
 
    <table align="center" width="85%" style="font-family: Arial, Helvetica, sans-serif;text-align:center;" cellpadding="2">
            
            <tr>
                <td colspan="4" style="font-size:12px; font-weight: normal">
                </td>
            </tr>
            
            <tr>
                <td colspan="4" style="font-weight:bold ; border-style: solid; border-width:1px;
                border-color:#000000;padding:3px;background-color:#B4C6E7;">
                  Service Locations and Fees
                </td>
            </tr>
        <tr><td></td></tr>
    </table>
   
    <table align="center" width="85%" style="font-family: Arial, Helvetica, sans-serif; text-align:center;"
               cellpadding="0">
              
            <apex:repeat var="sd" value="{!bidsList}">
          
              <apex:outputPanel layout="none" rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}" style="vertical-align:central; font-family: Arial, Helvetica, sans-serif; text-align:center;width:85%">

                    <tr>
                        <th style="text-align:center;background-color:#0094DA;border-bottom-style:solid;border-bottom-width:1px;border-top-width:1px; border-top-style:solid">Site Name</th>
                        <th style="text-align:center;background-color:#0094DA;border-bottom-style:solid;border-bottom-width:1px;border-top-width:1px; border-top-style:solid">Service Period</th>
                        <th style="text-align:center;background-color:#0094DA;border-bottom-style:solid;border-bottom-width:1px;border-top-width:1px;border-top-style:solid">Address</th>
                    </tr>

                   </apex:outputPanel>
                 
                <apex:outputPanel layout="none" rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}" style="vertical-align:central;font-family: Arial, Helvetica, sans-serif; text-align:center;width:85%">
                   
                    <tr>
                       
                        <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2" ><apex:outputPanel rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}"> {!sd.Customer__r.Name }</apex:outputPanel> </td>
                       
                       <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2" ><apex:outputPanel rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}"> <apex:outputText value="{0, date, MMMM d','  yyyy}">
                        <apex:param value="{!sd.Customer__r.Contract_Start_Date__c}" /> </apex:outputText>Seasonal<apex:outputText value="{0, date, MMMM d','  yyyy}"><apex:param value="{!sd.Customer__r.Contract_End_Date__c}" /></apex:outputText>

                </apex:outputPanel></td>

                       <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2" ><apex:outputPanel rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}">{!sd.Site__r.BillingStreet}<br/>{!sd.Site__r.BillingCity}, {!sd.Site__r.BillingState} {!sd.Site__r.BillingPostalCode} </apex:outputPanel></td>

                    </tr>

                </apex:outputPanel>
                
               
                       <apex:repeat var="et" value="{!bidsMap[sd.Name] }" rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}"    >
    
                           <apex:outputPanel layout="none" rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}" style="vertical-align:central;font-family: Arial, Helvetica, sans-serif; text-align:center;width:85%">
                   <tr>
                       <th style="text-align:center;background-color:#28baff;border-bottom-style:solid;border-bottom-width:1px;border-top-width:0px; border-top-style:solid">Month</th>
                       <th style="text-align:center;background-color:#28baff;border-bottom-style:solid;border-bottom-width:1px;border-top-width:0px; border-top-style:solid"></th>
                       <th style="text-align:center;background-color:#28baff;border-bottom-style:solid;border-bottom-width:1px;border-top-width:0px; border-top-style:solid">Monthly Payment</th>
                      
                   </tr>

                   
    </apex:outputPanel>
        
            
            <apex:outputPanel layout="none" rendered="{!IF(et.Contract_Start_Month__c = 'January' && sd.IsAddedToPDF__c =true  ,true,false)}">
         <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Jan-20</td>
                            
                            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>

            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>
            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 2 && sd.IsAddedToPDF__c =true  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Feb-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 3 && sd.IsAddedToPDF__c =true  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Mar-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 4 && sd.IsAddedToPDF__c =true  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Apr-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 5 && sd.IsAddedToPDF__c =true ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-May-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>
           

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 6 && sd.IsAddedToPDF__c =true ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Jun-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>
          

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 7 && sd.IsAddedToPDF__c =true ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Jul-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 8 && sd.IsAddedToPDF__c =true ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Aug-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 9 && sd.IsAddedToPDF__c =true ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Sep-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 10 && sd.IsAddedToPDF__c =true  ,true,false)}">

        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Oct-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText> </td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 11 && sd.IsAddedToPDF__c =true ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Nov-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>

            <apex:outputPanel layout="none" rendered="{!IF(et.Number_of_Months__c >= 12 && sd.IsAddedToPDF__c =true  ,true,false)}">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2">10-Dec-20</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Monthly_Payment__c}" /> </apex:outputText></td>
        </tr>
        </apex:outputPanel>
             
             <apex:outputPanel layout="none" rendered="{!IF( sd.IsAddedToPDF__c =true  ,true,false)}" style="font-family: Arial, Helvetica, sans-serif; text-align:center;">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:right;background-color:#f2f2f2;width:33%; text-align:center">Retainer Fee</td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2;width:20%"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2;width:25%"><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Retainer_Fee__c}" /> </apex:outputText></td>
        </tr>
            </apex:outputPanel>
            
            <apex:outputPanel layout="none" rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}" style="font-family: Arial, Helvetica, sans-serif; text-align:center;">
        <tr>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"></td>
            <td style="font-weight:bold ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2;width:40%"></td>
            <td style="font-weight:normal ; border-bottom-style:solid; border-bottom-width:1px;
                            color:#000000;padding:3px;text-align:center;background-color:#f2f2f2"><b>Total&#58; &nbsp;</b><apex:outputText value="{0, Number, Currency}"><apex:param value="{!et.Total__c}" /> </apex:outputText></td>
        </tr>
             
           
        </apex:outputPanel>
           </apex:repeat>
           </apex:repeat>
        </table>
     </html>
</form>

</apex:page>

 
Boss CoffeeBoss Coffee
You have two apex:repeat lines. The outer one may be repeating the table twice. What is the value bidsList?
<apex:repeat var="sd" value="{!bidsList}">
BobPBobP
Hi Boss,

Thanks for helping. The {!bidsList} is from my helper class below. 


 
Public Class AccountExtensionController{
   private Account acc;
   public List<Bids_Sent__c> bidsList {get;set;}
   public Map<String,List<Site_Bid_Details__c>>  bidsMap {get;set;}
   public AccountExtensionController(ApexPages.StandardController sc){
       acc = (Account)sc.getRecord();
       bidsList = new List<Bids_Sent__c>();
       bidsList = [SELECT Id,IsAddedToPDF__c,Site__r.Contract_Start_Date__c,Site__r.Contract_End_Date__c,Service_Year__c,Customer__r.Contract_Start_Date__c,Name,Customer__r.Contract_End_Date__c,Site__r.Name,Customer__r.Name,Primary_Contact__r.FirstName,Site__r.BillingCity,Site__r.BillingState,Site__r.BillingStreet,Site__r.BillingPostalCode  FROM Bids_Sent__c WHERE Awarded__c =: acc.Id];
    
    Set<Id> bidId = new  Set<Id>();  
    for(Bids_Sent__c bs : bidsList){
       bidId.add(bs.Id);
    }
     
    bidsMap = new Map<String,List<Site_Bid_Details__c>> ();
    for(Site_Bid_Details__c bd : [SELECT Id, Bid_Name__r.Name,Increment__c,Total__c,Price__c,Scope__c,Bid_Name__r.Service_Type__c,Number_of_Months__c,Retainer_Fee__c,Monthly_Payment__c,UOM__c  FROM Site_Bid_Details__c WHERE Bid_Name__c IN : bidId]){
        
        if(bidsMap.containsKey(bd.Bid_Name__r.Name)){
          bidsMap.get(bd.Bid_Name__r.Name).add(bd);
        }
        else{
            bidsMap.put(bd.Bid_Name__r.Name,new List<Site_Bid_Details__c>{bd});
        }
    } 

}

}

 
Boss CoffeeBoss Coffee
Could you check if that query returns more than one record?
bidsList = [SELECT Id,IsAddedToPDF__c,Site__r.Contract_Start_Date__c,Site__r.Contract_End_Date__c,Service_Year__c,Customer__r.Contract_Start_Date__c,Name,Customer__r.Contract_End_Date__c,Site__r.Name,Customer__r.Name,Primary_Contact__r.FirstName,Site__r.BillingCity,Site__r.BillingState,Site__r.BillingStreet,Site__r.BillingPostalCode  FROM Bids_Sent__c WHERE Awarded__c =: acc.Id];
BobPBobP
How would I check for this? 
BobPBobP
if it helps, her eis my original post
https://developer.salesforce.com/forums/ForumsMain?id=9062I000000IMjCQAW
 
Boss CoffeeBoss Coffee
First, get the ID of the Account you're looking at. Then, open up the Developer Console, and at the bottom there should be a tab called "Query Editor". In that tab, paste the following code in, but put your Account Id in between single quotes marked as below. Then click "Execute" to get the results of the query. Check if more than one record is returned.
SELECT Id,IsAddedToPDF__c,Site__r.Contract_Start_Date__c,Site__r.Contract_End_Date__c,Service_Year__c,Customer__r.Contract_Start_Date__c,Name,Customer__r.Contract_End_Date__c,Site__r.Name,Customer__r.Name,Primary_Contact__r.FirstName,Site__r.BillingCity,Site__r.BillingState,Site__r.BillingStreet,Site__r.BillingPostalCode  FROM Bids_Sent__c WHERE Awarded__c = 'PUT ACCOUNT ID BETWEEN SINGLE QUOTES HERE'
BobPBobP
It does return more than one record. See results below. I did add {!IF( sd.IsAddedToPDF__c =true  ,true,false)} in the vf code to only show records on my pdf so I'm not sure why the page is still double the output.


User-added image
Boss CoffeeBoss Coffee
If you look at that list of records, you have two at the top that have IsAddedToPDF__c as true, meaning two records are being iterated through.
BobPBobP
I have an account. procurement bids and site details objects. I have a button on the account page to print a pdf. On the procurement bids is where the  "IsAddedToPDF__c", so when i user check's that box it should show up on the visualforce (PDF) . So those two checkboxes are checked, so they should be added to the pdf. So I''m not clear on why it is duplicating or how to stop it.  
Boss CoffeeBoss Coffee
So you're expecting two tables to be shown on the VF page? Can you specify exactly what is being duplicated?
BobPBobP
In the example below I have one account say Acme Inc, the child related object to the account is the procurement bid. The section that has site name service period and address is coming from the procurement bid. The section with the Month and Monthly Payments info are child records of the procurement bids. I have two procurement bid checked to add to the pdf.  The first section show a total of 33,000.00. The second section shows total 50,000.  There should only show one site name then one group of monthly payments, then show the other site name and the other group of monthly payments. Below both records ar eshowing both monthly payment list.


User-added image
Boss CoffeeBoss Coffee
That should mean the duplicate is coming from the inner repeat. Could you put in System.debug lines to check if it's adding more than needed for each map entry?
// The inner apex:repeat
<apex:repeat var="et" value="{!bidsMap[sd.Name] }" rendered="{!IF(sd.IsAddedToPDF__c =true  ,true,false)}"    >
BobPBobP
Debug Log
Log	
46.0 APEX_CODE,FINEST;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;NBA,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WAVE,INFO;WORKFLOW,INFO
15:20:08.0 (424697)|USER_INFO|[EXTERNAL]|005f4000004nfrj|bpoliquin@casesnow.com.bptest|(GMT-04:00) Eastern Daylight Time (America/New_York)|GMT-04:00
15:20:08.0 (462094)|EXECUTION_STARTED
15:20:08.0 (467493)|CODE_UNIT_STARTED|[EXTERNAL]|0660m000001GLcE|VF: /apex/vf_Site_Bids_List_Test
15:20:08.0 (12069370)|SYSTEM_MODE_ENTER|true
15:20:08.0 (12418326)|HEAP_ALLOCATE|[72]|Bytes:3
15:20:08.0 (12454824)|HEAP_ALLOCATE|[77]|Bytes:152
15:20:08.0 (12469494)|HEAP_ALLOCATE|[342]|Bytes:408
15:20:08.0 (12484019)|HEAP_ALLOCATE|[355]|Bytes:408
15:20:08.0 (12495314)|HEAP_ALLOCATE|[467]|Bytes:48
15:20:08.0 (12520690)|HEAP_ALLOCATE|[139]|Bytes:6
15:20:08.0 (12536370)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:108
15:20:08.0 (12542781)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:5
15:20:08.0 (12553203)|METHOD_ENTRY|[1]|01p0m000003Koyt|AccountExtensionController.AccountExtensionController()
15:20:08.0 (12559287)|STATEMENT_EXECUTE|[1]
15:20:08.0 (12564544)|STATEMENT_EXECUTE|[1]
15:20:08.0 (12568278)|METHOD_EXIT|[1]|AccountExtensionController
15:20:08.0 (12672275)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:16
15:20:08.0 (12689965)|VARIABLE_SCOPE_BEGIN|[5]|this|AccountExtensionController|true|false
15:20:08.0 (12745363)|VARIABLE_ASSIGNMENT|[5]|this|{}|0x73353e2b
15:20:08.0 (12754498)|VARIABLE_SCOPE_BEGIN|[5]|sc|ApexPages.StandardController|true|false
15:20:08.0 (13109894)|VARIABLE_ASSIGNMENT|[5]|sc|"StandardController [null]"|0xecf4c97
15:20:08.0 (13122465)|STATEMENT_EXECUTE|[1]
15:20:08.0 (13124572)|STATEMENT_EXECUTE|[2]
15:20:08.0 (13127351)|STATEMENT_EXECUTE|[3]
15:20:08.0 (13128749)|STATEMENT_EXECUTE|[4]
15:20:08.0 (13137158)|HEAP_ALLOCATE|[6]|Bytes:6
15:20:08.0 (19256315)|STATEMENT_EXECUTE|[5]
15:20:08.0 (19268701)|STATEMENT_EXECUTE|[6]
15:20:08.0 (34800555)|HEAP_ALLOCATE|[6]|Bytes:48
15:20:08.0 (34914956)|VARIABLE_ASSIGNMENT|[6]|this.acc|{"BillingCity":"Medway","BillingStreet":"10 Trotter Dr.","BillingState":"Ma","BillingPostalCode":"02503","BillingCountry":"USA","BillingLatitude":42.143231000000000,"BillingLongitude":-71.473287000000000,"BillingGeocodeAccuracy":"Address","Id":"0010m00000Q4BiKAAV","Name":"Bob's Acme Snow Remo (3 more) ...","RecordTypeId":"012f4000000ejIRAAY"}|0x73353e2b
15:20:08.0 (34936094)|STATEMENT_EXECUTE|[7]
15:20:08.0 (34958161)|HEAP_ALLOCATE|[7]|Bytes:4
15:20:08.0 (35156716)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this|{"acc":"0x466a140d"}|0x73353e2b
15:20:08.0 (35177821)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:4
15:20:08.0 (35192831)|VARIABLE_ASSIGNMENT|[EXTERNAL]|value|[]|0x4e8e06c5
15:20:08.0 (35210375)|VARIABLE_ASSIGNMENT|[3]|this.bidsList|[]|0x73353e2b
15:20:08.0 (35227932)|STATEMENT_EXECUTE|[8]
15:20:08.0 (35234313)|HEAP_ALLOCATE|[8]|Bytes:453
15:20:08.0 (35262916)|HEAP_ALLOCATE|[8]|Bytes:4
15:20:08.0 (35278243)|HEAP_ALLOCATE|[8]|Bytes:7
15:20:08.0 (35391113)|HEAP_ALLOCATE|[50]|Bytes:5
15:20:08.0 (35420804)|HEAP_ALLOCATE|[56]|Bytes:5
15:20:08.0 (35434512)|HEAP_ALLOCATE|[64]|Bytes:7
15:20:08.0 (37674799)|SOQL_EXECUTE_BEGIN|[8]|Aggregations:0|SELECT Id, IsAddedToPDF__c, Site__c, Site__r.Contract_Start_Date__c, Site__r.Contract_End_Date__c, Site__r.Customer_Location_ID__c, Site__r.Name, Site__r.BillingCity, Site__r.BillingState, Site__r.BillingStreet, Site__r.BillingPostalCode, Service_Year__c, Customer__r.Contract_Start_Date__c, Customer__r.Contract_End_Date__c, Customer__r.Name, Name, Primary_Contact__r.FirstName FROM Bids_Sent__c WHERE (Awarded__c = :tmpVar1 AND IsAddedToPDF__c = TRUE)
15:20:08.0 (49418425)|SOQL_EXECUTE_END|[8]|Rows:2
15:20:08.0 (49457650)|HEAP_ALLOCATE|[8]|Bytes:12
15:20:08.0 (49504509)|HEAP_ALLOCATE|[8]|Bytes:898
15:20:08.0 (49550354)|HEAP_ALLOCATE|[8]|Bytes:12
15:20:08.0 (49642406)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this|{"acc":"0x466a140d","bidsList":"0x4e8e06c5"}|0x73353e2b
15:20:08.0 (49763707)|VARIABLE_ASSIGNMENT|[EXTERNAL]|value|[{"Id":"a0M0m000001IU1hEAG","IsAddedToPDF__c":true,"Site__c":"0010m00000Q4BiKAAV","Service_Year__c":"2019","Customer__c":"0010m00000Q4BiKAAV","Name":"Bob's Acme Snow Remo (3 more) ...","Primary_Contact__c":"0030m00000PlWOIAA3","Site__r":{"Contract_Start_Date__c":"2019-01-01T00:00:00.000Z","Name":"Bob's Acme Snow Remo (3 more) ...","BillingCity":"Medway","BillingState":"Ma","BillingStreet":"10 Trotter Dr.","BillingPostalCode":"02503","Id":"0010m00000Q4BiKAAV","RecordTypeId":"012f4000000ejIRAAY"},"Customer__r":{"Contract_Start_Date__c":"2019-01-01T00:00:00.000Z","Name":"Bob's Acme Snow Remo (3 more) ...","Id":"0010m00000Q4BiKAAV","RecordTypeId":"012f4000000ejIRAAY"},"Primary_Contact__r":{"FirstName":"Bob","Id":"0030m00000PlWOIAA3"}},{"Id":"a0M0m000001ITkqEAG","IsAddedToPDF__c":true,"Site__c":"0010m00000Q4BiKAAV","Service_Year__c":"2019","Customer__c":"0010m00000Q4BiKAAV","Name":"Bob's Acme Snow Remo (3 more) ...","Primary_Contact__c":"0030m00000PlWOIAA3","Site__r":{"Contract_Start_Date__c":"2019-01-01T00:00:00.000Z","Name":"Bob's Acme Snow Remo (3 more) ...","BillingCity":"Medway","BillingState":"Ma","BillingStreet":"10 Trotter Dr.","BillingPostalCode":"02503","Id":"0010m00000Q4BiKAAV","RecordTypeId":"012f4000000ejIRAAY"},"Customer__r":{"Contract_Start_Date__c":"2019-01-01T00:00:00.000Z","Name":"Bob's Acme Snow Remo (3 more) ...","Id":"0010m00000Q4BiKAAV","RecordTypeId":"012f4000000ejIRAAY"},"Primary_Contact__r":{"FirstName":"Bob","Id":"0030m00000PlWOIAA3"}}]|0x74428a95
15:20:08.0 (49900093)|VARIABLE_ASSIGNMENT|[3]|this.bidsList|[{"Id":"a0M0m000001IU1hEAG","IsAddedToPDF__c":true,"Site__c":"0010m00000Q4BiKAAV","Service_Year__c":"2019","Customer__c":"0010m00000Q4BiKAAV","Name":"Bob's Acme Snow Remo (3 more) ...","Primary_Contact__c":"0030m00000PlWOIAA3","Site__r":{"Contract_Start_Date__c":"2019-01-01T00:00:00.000Z","Name":"Bob's Acme Snow Remo (3 more) ...","BillingCity":"Medway","BillingState":"Ma","BillingStreet":"10 Trotter Dr.","BillingPostalCode":"02503","Id":"0010m00000Q4BiKAAV","RecordTypeId":"012f4000000ejIRAAY"},"Customer__r":{"Contract_Start_Date__c":"2019-01-01T00:00:00.000Z","Name":"Bob's Acme Snow Remo (3 more) ...","Id":"0010m00000Q4BiKAAV","RecordTypeId":"012f4000000ejIRAAY"},"Primary_Contact__r":{"FirstName":"Bob","Id":"0030m00000PlWOIAA3"}},{"Id":"a0M0m000001ITkqEAG","IsAddedToPDF__c":true,"Site__c":"0010m00000Q4BiKAAV","Service_Year__c":"2019","Customer__c":"0010m00000Q4BiKAAV","Name":"Bob's Acme Snow Remo (3 more) ...","Primary_Contact__c":"0030m00000PlWOIAA3","Site__r":{"Contract_Start_Date__c":"2019-01-01T00:00:00.000Z","Name":"Bob's Acme Snow Remo (3 more) ...","BillingCity":"Medway","BillingState":"Ma","BillingStreet":"10 Trotter Dr.","BillingPostalCode":"02503","Id":"0010m00000Q4BiKAAV","RecordTypeId":"012f4000000ejIRAAY"},"Customer__r":{"Contract_Start_Date__c":"2019-01-01T00:00:00.000Z","Name":"Bob's Acme Snow Remo (3 more) ...","Id":"0010m00000Q4BiKAAV","RecordTypeId":"012f4000000ejIRAAY"},"Primary_Contact__r":{"FirstName":"Bob","Id":"0030m00000PlWOIAA3"}}]|0x73353e2b
15:20:08.0 (49929542)|STATEMENT_EXECUTE|[10]
15:20:08.0 (49952432)|HEAP_ALLOCATE|[10]|Bytes:4
15:20:08.0 (50011487)|VARIABLE_SCOPE_BEGIN|[10]|bidId|Set<Id>|true|false
15:20:08.0 (50045218)|VARIABLE_ASSIGNMENT|[10]|bidId|[]|0x2161408c
15:20:08.0 (50101880)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this|{"acc":"0x466a140d","bidsList":"0x74428a95"}|0x73353e2b
15:20:08.0 (50308596)|HEAP_ALLOCATE|[11]|Bytes:5
15:20:08.0 (50334565)|HEAP_ALLOCATE|[11]|Bytes:44
15:20:08.0 (50345538)|VARIABLE_SCOPE_BEGIN|[11]|bs|Bids_Sent__c|true|false
15:20:08.0 (50406170)|VARIABLE_ASSIGNMENT|[11]|bs|{"Id":"a0M0m000001IU1hEAG","IsAddedToPDF__c":true,"Site__c":"0010m00000Q4BiKAAV","Service_Year__c":"2019","Customer__c":"0010m00000Q4BiKAAV","Name":"Bob's Acme Snow Remo (3 more) ...","Primary_Contact__c":"0030m00000PlWOIAA3","Site__r":{"Contract_Start_Date__c":"2019-01-01T00:00:00.000Z","Name":"Bob's Acme Snow Remo (3 more) ...","BillingCity":"Medway","BillingState":"Ma","BillingStreet":"10 Trotter Dr.","BillingPostalCode":"02503","Id":"0010m00000Q4BiKAAV","RecordTypeId":"012f4000000ejIRAAY"},"Customer__r":{"Contract_Start_Date__c":"2019-01-01T00:00:00.000Z","Name":"Bob's Acme Snow Remo (3 more) ...","Id":"0010m00000Q4BiKAAV","RecordTypeId":"012f4000000ejIRAAY"},"Primary_Contact__r":{"FirstName":"Bob","Id":"0030m00000PlWOIAA3"}}|0x53eb1fd2
15:20:08.0 (50420496)|STATEMENT_EXECUTE|[11]
15:20:08.0 (50422577)|STATEMENT_EXECUTE|[12]
15:20:08.0 (50501512)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:4
15:20:08.0 (50521438)|HEAP_ALLOCATE|[11]|Bytes:5
15:20:08.0 (50533829)|HEAP_ALLOCATE|[11]|Bytes:44
15:20:08.0 (50540539)|VARIABLE_SCOPE_BEGIN|[11]|bs|Bids_Sent__c|true|false
15:20:08.0 (50591558)|VARIABLE_ASSIGNMENT|[11]|bs|{"Id":"a0M0m000001ITkqEAG","IsAddedToPDF__c":true,"Site__c":"0010m00000Q4BiKAAV","Service_Year__c":"2019","Customer__c":"0010m00000Q4BiKAAV","Name":"Bob's Acme Snow Remo (3 more) ...","Primary_Contact__c":"0030m00000PlWOIAA3","Site__r":{"Contract_Start_Date__c":"2019-01-01T00:00:00.000Z","Name":"Bob's Acme Snow Remo (3 more) ...","BillingCity":"Medway","BillingState":"Ma","BillingStreet":"10 Trotter Dr.","BillingPostalCode":"02503","Id":"0010m00000Q4BiKAAV","RecordTypeId":"012f4000000ejIRAAY"},"Customer__r":{"Contract_Start_Date__c":"2019-01-01T00:00:00.000Z","Name":"Bob's Acme Snow Remo (3 more) ...","Id":"0010m00000Q4BiKAAV","RecordTypeId":"012f4000000ejIRAAY"},"Primary_Contact__r":{"FirstName":"Bob","Id":"0030m00000PlWOIAA3"}}|0x3c252b78
15:20:08.0 (50605984)|STATEMENT_EXECUTE|[11]
15:20:08.0 (50607708)|STATEMENT_EXECUTE|[12]
15:20:08.0 (50619766)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:4
15:20:08.0 (50631670)|HEAP_ALLOCATE|[11]|Bytes:5
15:20:08.0 (50642743)|VARIABLE_ASSIGNMENT|[11]|bs|null|
15:20:08.0 (50648884)|STATEMENT_EXECUTE|[15]
15:20:08.0 (50667015)|HEAP_ALLOCATE|[15]|Bytes:4
15:20:08.0 (50764254)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this|{"acc":"0x466a140d","bidsList":"0x74428a95"}|0x73353e2b
15:20:08.0 (50784911)|VARIABLE_ASSIGNMENT|[EXTERNAL]|value|{}|0x658b2f51
15:20:08.0 (50798123)|VARIABLE_ASSIGNMENT|[4]|this.bidsMap|{}|0x73353e2b
15:20:08.0 (50810705)|HEAP_ALLOCATE|[16]|Bytes:318
15:20:08.0 (50825434)|HEAP_ALLOCATE|[16]|Bytes:4
15:20:08.0 (52550023)|SOQL_EXECUTE_BEGIN|[16]|Aggregations:0|SELECT Id, Bid_Name__r.Name, Bid_Name__r.Service_Type__c, Site__c, Contract_Start_Month__c, Site__r.Customer_Location_ID__c, Customer__r.Contract_Month__c, Increment__c, Total__c, Price__c, Scope__c, Number_of_Months__c, Retainer_Fee__c, Monthly_Payment__c, UOM__c FROM Site_Bid_Details__c 
15:20:08.0 (72045527)|SOQL_EXECUTE_END|[16]|Rows:2
15:20:08.0 (72090689)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
15:20:08.0 (72289700)|HEAP_ALLOCATE|[16]|Bytes:54
15:20:08.0 (72305271)|HEAP_ALLOCATE|[16]|Bytes:8
15:20:08.0 (72325006)|SYSTEM_METHOD_ENTRY|[7]|QueryLocatorIterator.QueryLocatorIterator()
15:20:08.0 (72332405)|STATEMENT_EXECUTE|[7]
15:20:08.0 (72344222)|SYSTEM_METHOD_EXIT|[7]|QueryLocatorIterator
15:20:08.0 (72359895)|HEAP_ALLOCATE|[16]|Bytes:28
15:20:08.0 (72399167)|HEAP_ALLOCATE|[16]|Bytes:12
15:20:08.0 (72421273)|HEAP_ALLOCATE|[16]|Bytes:8
15:20:08.0 (72427849)|HEAP_ALLOCATE|[16]|Bytes:8
15:20:08.0 (72437479)|VARIABLE_SCOPE_BEGIN|[15]|this|Database.QueryLocatorIterator|true|false
15:20:08.0 (72491573)|VARIABLE_ASSIGNMENT|[15]|this|{}|0x3d3404cf
15:20:08.0 (72503436)|VARIABLE_SCOPE_BEGIN|[15]|values|List<SObject>|true|false
15:20:08.0 (72628501)|VARIABLE_ASSIGNMENT|[15]|values|[{"Id":"a0K0m000002RPkfEAG","Bid_Name__c":"a0M0m000001IU1hEAG","Site__c":"0010m00000QRKrrAAH","Contract_Start_Month__c":"January","Customer__c":"0010m00000QRKrrAAH","Total__c":42000.00,"Price__c":42000.00,"Scope__c":"Seasonal","Number_of_Months__c":5,"Retainer_Fee__c":2100.00,"Monthly_Payment__c":7980.00,"UOM__c":"Seasonal","Bid_Name__r":{"Name":"Bob's Acme Snow Remo (3 more) ...","Service_Type__c":"Seasonal","Id":"a0M0m000001IU1hEAG"},"Site__r":{"Id":"0010m00000QRKrrAAH","RecordTypeId":"012f4000000ejIRAAY"},"Customer__r":{"Contract_Month__c":"January","Id":"0010m00000QRKrrAAH","RecordTypeId":"012f4000000ejIRAAY"}},{"Id":"a0K0m000002RPNMEA4","Bid_Name__c":"a0M0m000001ITkqEAG","Site__c":"0010m00000Q4BiKAAV","Contract_Start_Month__c":"January","Customer__c":"0010m00000Q4BiKAAV","Increment__c":"4\"-5.99\"","Total__c":50000.00,"Price__c":2000.00,"Scope__c":"Seasonal","Number_of_Months__c":5,"Retainer_Fee__c":2500.00,"Monthly_Payment__c":9500.00,"UOM__c":"Seasonal","Bid_Name__r":{"Name":"Bob's Acme Snow Remo (3 more) ...","Service_Type__c":"Seasonal","Id":"a0M0m000001ITkqEAG"},"Site__r":{"Id":"0010m00000Q4BiKAAV","RecordTypeId":"012f4000000ejIRAAY"},"Customer__r":{"Contract_Month__c":"January","Id":"0010m00000Q4BiKAAV","RecordTypeId":"012f4000000ejIRAAY"}}]|0x67ac13bd
15:20:08.0 (72663252)|VARIABLE_SCOPE_BEGIN|[15]|ql|Database.QueryLocator|true|false
15:20:08.0 (72689663)|VARIABLE_ASSIGNMENT|[15]|ql|{"query":"SELECT Id, Bid_Name_ (298 more) ..."}|0x75432dce
15:20:08.0 (72698694)|VARIABLE_SCOPE_BEGIN|[15]|totalNumRecords|Integer|false|false
15:20:08.0 (72711082)|VARIABLE_ASSIGNMENT|[15]|totalNumRecords|2
15:20:08.0 (72717585)|VARIABLE_SCOPE_BEGIN|[15]|queryMoreSize|Integer|false|false
15:20:08.0 (72728780)|VARIABLE_ASSIGNMENT|[15]|queryMoreSize|49996
15:20:08.0 (72797142)|HEAP_ALLOCATE|[16]|Bytes:28
15:20:08.0 (72826476)|METHOD_ENTRY|[16]||Database.QueryLocatorIterator.hasNext()
15:20:08.0 (72927871)|METHOD_EXIT|[16]||Database.QueryLocatorIterator.hasNext()
15:20:08.0 (72943405)|METHOD_ENTRY|[16]||Database.QueryLocatorIterator.next()
15:20:08.0 (73039991)|METHOD_EXIT|[16]||Database.QueryLocatorIterator.next()
15:20:08.0 (73054014)|VARIABLE_SCOPE_BEGIN|[16]|bd|Site_Bid_Details__c|true|false
15:20:08.0 (73120633)|VARIABLE_ASSIGNMENT|[16]|bd|{"Id":"a0K0m000002RPkfEAG","Bid_Name__c":"a0M0m000001IU1hEAG","Site__c":"0010m00000QRKrrAAH","Contract_Start_Month__c":"January","Customer__c":"0010m00000QRKrrAAH","Total__c":42000.00,"Price__c":42000.00,"Scope__c":"Seasonal","Number_of_Months__c":5,"Retainer_Fee__c":2100.00,"Monthly_Payment__c":7980.00,"UOM__c":"Seasonal","Bid_Name__r":{"Name":"Bob's Acme Snow Remo (3 more) ...","Service_Type__c":"Seasonal","Id":"a0M0m000001IU1hEAG"},"Site__r":{"Id":"0010m00000QRKrrAAH","RecordTypeId":"012f4000000ejIRAAY"},"Customer__r":{"Contract_Month__c":"January","Id":"0010m00000QRKrrAAH","RecordTypeId":"012f4000000ejIRAAY"}}|0x5159a32f
15:20:08.0 (73142784)|STATEMENT_EXECUTE|[16]
15:20:08.0 (73214157)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this|{"acc":"0x466a140d","bidsList":"0x74428a95","bidsMap":"0x658b2f51"}|0x73353e2b
15:20:08.0 (73337540)|STATEMENT_EXECUTE|[21]
15:20:08.0 (73340615)|STATEMENT_EXECUTE|[22]
15:20:08.0 (73379588)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this|{"acc":"0x466a140d","bidsList":"0x74428a95","bidsMap":"0x658b2f51"}|0x73353e2b
15:20:08.0 (73407306)|HEAP_ALLOCATE|[22]|Bytes:4
15:20:08.0 (73434419)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:8
15:20:08.0 (73440798)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:-4
15:20:08.0 (73450598)|METHOD_ENTRY|[16]||Database.QueryLocatorIterator.hasNext()
15:20:08.0 (73472691)|METHOD_EXIT|[16]||Database.QueryLocatorIterator.hasNext()
15:20:08.0 (73478943)|METHOD_ENTRY|[16]||Database.QueryLocatorIterator.next()
15:20:08.0 (73522443)|METHOD_EXIT|[16]||Database.QueryLocatorIterator.next()
15:20:08.0 (73529073)|VARIABLE_SCOPE_BEGIN|[16]|bd|Site_Bid_Details__c|true|false
15:20:08.0 (73573862)|VARIABLE_ASSIGNMENT|[16]|bd|{"Id":"a0K0m000002RPNMEA4","Bid_Name__c":"a0M0m000001ITkqEAG","Site__c":"0010m00000Q4BiKAAV","Contract_Start_Month__c":"January","Customer__c":"0010m00000Q4BiKAAV","Increment__c":"4\"-5.99\"","Total__c":50000.00,"Price__c":2000.00,"Scope__c":"Seasonal","Number_of_Months__c":5,"Retainer_Fee__c":2500.00,"Monthly_Payment__c":9500.00,"UOM__c":"Seasonal","Bid_Name__r":{"Name":"Bob's Acme Snow Remo (3 more) ...","Service_Type__c":"Seasonal","Id":"a0M0m000001ITkqEAG"},"Site__r":{"Id":"0010m00000Q4BiKAAV","RecordTypeId":"012f4000000ejIRAAY"},"Customer__r":{"Contract_Month__c":"January","Id":"0010m00000Q4BiKAAV","RecordTypeId":"012f4000000ejIRAAY"}}|0x40a29c2b
15:20:08.0 (73586387)|STATEMENT_EXECUTE|[16]
15:20:08.0 (73609452)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this|{"acc":"0x466a140d","bidsList":"0x74428a95","bidsMap":"0x658b2f51"}|0x73353e2b
15:20:08.0 (73647176)|STATEMENT_EXECUTE|[18]
15:20:08.0 (73649500)|STATEMENT_EXECUTE|[19]
15:20:08.0 (73683183)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this|{"acc":"0x466a140d","bidsList":"0x74428a95","bidsMap":"0x658b2f51"}|0x73353e2b
15:20:08.0 (73732494)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:4
15:20:08.0 (73742960)|METHOD_ENTRY|[16]||Database.QueryLocatorIterator.hasNext()
15:20:08.0 (73756108)|METHOD_EXIT|[16]||Database.QueryLocatorIterator.hasNext()
15:20:08.0 (73765104)|VARIABLE_ASSIGNMENT|[16]|bd|null|
15:20:08.0 (73892301)|SYSTEM_MODE_ENTER|true
15:20:08.0 (75431700)|SYSTEM_MODE_ENTER|true
15:20:08.147 (147310172)|CUMULATIVE_LIMIT_USAGE
15:20:08.147 (147310172)|LIMIT_USAGE_FOR_NS|(default)|
  Number of SOQL queries: 2 out of 100
  Number of query rows: 4 out of 50000
  Number of SOSL queries: 0 out of 20
  Number of DML statements: 0 out of 150
  Number of DML rows: 0 out of 10000
  Maximum CPU time: 0 out of 10000
  Maximum heap size: 0 out of 6000000
  Number of callouts: 0 out of 100
  Number of Email Invocations: 0 out of 10
  Number of future calls: 0 out of 50
  Number of queueable jobs added to the queue: 0 out of 50
  Number of Mobile Apex push calls: 0 out of 10

15:20:08.147 (147310172)|CUMULATIVE_LIMIT_USAGE_END

15:20:08.0 (147485743)|CODE_UNIT_FINISHED|VF: /apex/vf_Site_Bids_List_Test
15:20:08.0 (148704590)|EXECUTION_FINISHED

 
Boss CoffeeBoss Coffee
Run it with the following system debugs during map population. When opening the execution log, select the box "Debug Only" so it narrows it down to just these system debugs.
if(bidsMap.containsKey(bd.Bid_Name__r.Name)){
  System.debug('CONTAINS KEY: ' + bd.Bid_Name__r.Name);
  bidsMap.get(bd.Bid_Name__r.Name).add(bd);
} else { 
  System.debug('CREATE: ' + bd.Bid_Name__r.Name);
  bidsMap.put(bd.Bid_Name__r.Name,new List<Site_Bid_Details__c>{bd}); 
}

 
BobPBobP
I apoligize is this in the developer console?
Boss CoffeeBoss Coffee
Yes, in the Developer Console, edit the Apex class to include the System.debug statements shown in my previous post. Then when you're loading the page, it should run your Apex code, and then the Log should be stored under the "Logs" tab at the bottom of the Developer Console. Opening it and checking "Debug Only" will display the specificed System.debugs.
BobPBobP
Good afternoon all,

It's the issue with this vf code was not the code but some corrupt data.

I refreshed my partial sandbox and tested the visualforce page and it seems to be working fine.  I apoligize for wasting everyone time and really appreciate your help!!!.