• Laura Spellman
  • NEWBIE
  • 25 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
Hey there,

I am building a custom 'Customizable Forecast' tab from scratch using Visualforce and a custom controller to add some new features. One of my requirements is to forecast off of the 'forecast heirarchy' defined in the Setup->Build->Customize->Forecasts (Customizable)->Forecasts Hierarchy. Until now, I've used the UserRoleId Field to find direct reports and subordinate roles/users. How can I use SOQL to query the Forecast Heirarchy for Direct Reports and  subordinate users instead? I can not find any info on an object that contains this information.



 
Hey there!

I am new to visualforce and am currently recreating the customizable forecast tab to add some features needed by our exec team. My current question is in regards to recreating the top section of the page, seen belowootb customizable forecast - top section

Currently, I have added the new features to the page and I have to data stored in a list of lists of a class defined as forecastValues. I'll include the data structure code below.
public class forecastValues {
    public Decimal quantity{ get; set; }
    public Decimal revenue{ get; set; }
    }
public List<forecastValues> forecastCategValues{get; set;}
public List<List<forecastValues>> monthlyValues{get; set;}

        Public static forecastValues initializeForecastValues(){
            forecastValues fv = new forecastValues();
            fv.quantity = 0; fv.revenue = 0;
            return fv;
        }

        Public List<forecastValues> initializeforecastCategValues(){
            forecastCategValues = new forecastValues[5]; //one for each category: closed, commit, bestCAse, Pipeline, TOTALS

            for (integer i = 0; i < forecastCategValues.size(); i++){
                forecastCategValues[i] = initializeForecastValues();
            }
            return forecastCategValues;
        }


       Public List<List<forecastValues>> initializemonthlyValues(){
            monthlyValues = new List<List<ForecastValues>>();
            for (integer i = 0; i < integer.valueOf(selectedRangeLength); i++){ // one for each period in forecasting range: 1-6
                monthlyValues.add(initializeforecastCategValues());
           }
            return monthlyValues;
       }

So I have a <List<list<forecastValues>> monthlyValues where all of the data I'd like to display is located. From this point though, I would appreciate some help on how to display it in a visualforce table. I essentially have a groups of quantities and revenues that need to be associated with a month and forecast category on the page, but this information isnt explicitly noted in monthlyValues.

I would much appreciate any advice or help that you may have for me.  is there a way to manually name the rows and columns, etc??

Thank you!
 
Hey there, 

I am new to salesforce dev and am having issues getting a visual force page to open from a custom list button on a custom object. When I click the custom list button from the object (sales activity) , my page doesnt open and a standard add contact form does. I've researched a bit in this forum, and learned that this can be due to a missing standard controller. I followed that advice and dont think that is my issue, although I could very easily be wrong. The full page source is below, meant to allow users to add a contact from various sources to be an 'Impact Contact'. What I think might be the issue is in the custom controller, which I also have the code listed below. 
<apex:page standardController="IMPACT_Contact__c" recordSetVar="contacts" extensions="IMPACTContactExt" title="Add IMPACT Contacts to Sales Activity">


    <apex:tabPanel switchType="client" selectedTab="available" id="contactPanel">
        <apex:tab label="Available Contacts" name="available" id="tabAvailable">
            <apex:form id="formAddContact">
            <apex:pageBlock title="Available Contacts">
                <apex:pageBlockButtons >
                    <apex:commandButton action="{!addOthers}" value="Add Selected Contacts" reRender="otherContacts, existingContactsTable"/>
                    <apex:commandButton action="{!done}" value="Done"/>
                </apex:pageBlockButtons>
                 <apex:selectCheckboxes id="otherContacts" layout="pageDirection" value="{!otherSelectedContacts}">
                    <apex:selectOptions value="{!otherContacts}"/>
                </apex:selectCheckboxes>
            </apex:pageBlock>
            </apex:form>        
        </apex:tab>

        <apex:tab label="Find Contacts" name="find" id="tabFind">
            <apex:form id="formFindContact">
                <apex:pageBlock title="Find Contacts">
                    <apex:pageBlockButtons >
                        <apex:commandButton action="{!findContacts}" value="Find Contacts" reRender="findResults"/>
                        <apex:commandButton action="{!addFound}" value="Add Selected Contacts" reRender="findResults, existingContactsTable"/>
                        <apex:commandButton action="{!done}" value="Done" immediate="true" />
                    </apex:pageBlockButtons>
                    <apex:outputPanel id="findResults">
                        <apex:pageBlockSection title="Contact to Find" columns="1">
                            <apex:inputField value="{!findContact.FirstName}" />
                            <apex:inputField value="{!findContact.LastName}" required="true" />
                        </apex:pageBlockSection>
                        <apex:selectCheckboxes id="foundContacts" layout="pageDirection" value="{!foundSelectedContacts}">
                            <apex:selectOptions value="{!foundContacts}"/>
                        </apex:selectCheckboxes>
                        <apex:outputPanel id="noContactsFound"  rendered="{! IF(AND(foundContacts.size = 0, findContact.LastName <> null), 'TRUE', 'FALSE') }">
                            There were no contacts found matching your search criteria.
                        </apex:outputPanel>
                    </apex:outputPanel>
    
                </apex:pageBlock>
            </apex:form>        
        </apex:tab>

        <apex:tab label="Create New Contact" name="new" id="tabNew">
            <div>
                Use this form to add a new contact to Salesforce and associate it 
                with this sales activity with the selected role.  A search of existing contacts will
                be conducted automatically before the new contact record is created. If
                an existing contact is found, they will be associated with the sales activity.
            </div>
            <apex:form id="formNewContact">
                <apex:pageBlock >
                    <apex:pageBlockButtons >
                        <apex:commandButton action="{!addNew}" value="Save and Add" reRender="newContactSection, existingContactsTable"/>
                        <apex:commandButton action="{!done}" value="Done" immediate="true" />
                    </apex:pageBlockButtons>
                    <apex:pageBlockSection columns="2" id="newContactSection">
                        <apex:inputField value="{!newContact.FirstName}" required="true"/>
                        <apex:inputField value="{!newContact.LastName}" required="true"/>
                        <apex:inputField value="{!newContact.Title}"/>
                        <apex:inputField value="{!newContact.Phone}"/>
                        <apex:inputField value="{!newContact.Email}"/>
                        <apex:inputField value="{!newContact.AccountID}" required="true"/>
                        <apex:inputField value="{!newIMPACTContact.Contact_Role__c}" required="true"/>
                        {!addContactResult}
                    </apex:pageBlockSection>
                </apex:pageBlock>
            </apex:form>
        </apex:tab>        

        <apex:tab label="Existing Key Contacts" name="existing" id="tabExisting">
            <apex:form id="formExistingContact">
                <apex:pageBlock title="Associated Contacts">
                    <apex:pageBlockButtons >
                        <apex:commandButton action="{!done}" value="Done"/>
                    </apex:pageBlockButtons>            
                    <apex:pageBlockTable value="{!impactContacts}" var="ic" id="existingContactsTable">
                        <apex:column value="{!ic.Contact__r.Name}"/>
                        <apex:column value="{!ic.Contact__r.Title}"/>
                        <apex:column value="{!ic.Contact__r.Account.Name}"/>
                        <apex:column value="{!ic.Contact_Role__c}"/>
                    </apex:pageBlockTable>
                </apex:pageBlock>
            </apex:form>
        </apex:tab>
        
        
    </apex:tabPanel>
When attempting to preview my page, I get an error <List has no rows for assignment to SObject > which makes me think I have an issue with my query, specifically
this.salesActivity
So My questions are this: Will a query mistake in the custom controller prevent the entire page from loading, including all tabs, formatting, etc? and secondly, is there anything glaringly obvious with the way I am approaching this that is wrong? I have been researching the issue and am pretty stuck now. 
public with sharing class IMPACTContactExt {
    private final IMPACT_Contact__c  impactContact;
    private final Sales_Activity__c  salesActivity;
    
    public IMPACTContactExt(ApexPages.StandardSetController controller) {
        
        this.impactContact = (IMPACT_Contact__c)controller.getRecord();
        this.salesActivity = [SELECT Id, Activity_Type__c, Activity_Status__c FROM Sales_Activity__c WHERE Id = :ApexPages.currentPage().getParameters().get('id')];
    
    }
    
    public IMPACTContactExt(Sales_Activity__c p) {
        this.salesActivity = [SELECT Id, Activity_Type__c, Activity_Status__c FROM Sales_Activity__c WHERE Id = :p.Id];
    }
    
    public IMPACT_Contact__c newIMPACTContact {
        get{ 
            if (newIMPACTContact == null) newIMPACTContact = new IMPACT_Contact__c(Sales_Activity__c = salesActivity.Id);
            return newIMPACTContact; 
        } 
        set;
    }
    
    public Contact newContact {
        get{ 
            if (newContact == null ) newContact = new Contact();
            return newContact; 
        } 
        set;
    }
    
    public String addContactResult {get; set;}
    
    public Contact findContact {
        get{ 
            if (findContact == null ) findContact = new Contact();
            return findContact; 
        } 
        set;
    }

    public List<IMPACT_Contact__c> getIMPACTContacts() {
        List<IMPACT_Contact__c> impactContacts;
    
        if(impactContacts == null){
            impactContacts = [
                SELECT 
                    Name
                    ,Id
                    ,Contact__r.Title
                    ,Contact__r.Email
                    ,Contact__r.Phone
                    ,Contact__r.Name
                    ,Contact__r.AccountId
                    ,Contact__r.Account.Name
                    ,Contact__r.Id
                    ,Contact__c
                    ,Contact_Role__c 
                FROM IMPACT_Contact__c
                WHERE Sales_Activity__c = :salesActivity.Id
            ];
        }
        
        return impactContacts;
    }

    private Set<ID> GetExistingContactIds() {
        Set<ID> existingContacts = new Set<ID>();
            
        for (IMPACT_Contact__c c : [SELECT Contact__r.Id FROM IMPACT_Contact__c WHERE Sales_Activity__c = :salesActivity.Id ])
            existingContacts.add(c.Contact__r.Id);
        
        return existingContacts;
    }
    
    
    public String[] otherSelectedContacts {
        get{
            if (otherSelectedContacts == null) otherSelectedContacts = new String[]{};
            return otherSelectedContacts;
        }
        set;
    }
    
    public String[] foundSelectedContacts {
        get{
            if (foundSelectedContacts == null) foundSelectedContacts = new String[]{};
            return foundSelectedContacts;
        }
        set;
    }
    
    public List<Selectoption> otherContacts {
        get {
            List<Contact> otherContacts;
            List<Selectoption> otherContactSelect = new List<Selectoption>();
            List<ID> accounts = new List<ID>();
            Set<ID> existingContacts = GetExistingContactIds();
            
            if (salesActivity.Activity_Type__c != null) accounts.add(salesActivity.Activity_Type__c);
            if (salesActivity.Activity_Status__c != null) accounts.add(salesActivity.Activity_Status__c);
    
            otherContacts = [
                SELECT Id, Title, Name, Account.Name
                FROM Contact
                WHERE AccountId IN :accounts AND Id NOT IN :existingContacts
            ];
            
            for (Contact c : otherContacts) {
                String contactDescription = c.Name;
                if (c.Title != null && c.Account.Name != null) {
                    contactDescription += ', ' + c.Title + ' - ' + c.Account.Name;
                } else if (c.Title != null) {
                    contactDescription += ', ' + c.Title;
                    
                } else if (c.Account.Name != null) {
                    contactDescription += ' - ' + c.Account.Name;
                }

                otherContactSelect.add(new Selectoption(c.Id, contactDescription));
            }
            
            return otherContactSelect;
        }
        set;
    }
    
    public List<Selectoption> foundContacts {
        get {
            if(foundContacts == null) foundContacts = new List<Selectoption>();
            return foundContacts;
        }
        set;
    }
    
    public PageReference findContacts() {

        if (findContact.LastName != null) {
            String newContactName;
            if(findContact.FirstName != null) {
                newContactName = findContact.FirstName + ' ' + findContact.LastName;
            } else {
                newContactName = findContact.LastName;
            }
            
            List<List<Sobject>> contactSearch = [FIND :newContactName IN NAME FIELDS RETURNING Contact(Id, Name, Title, Account.Name)];
            Contact [] contactsFound = ((List<Contact>)contactSearch[0]);
            foundContacts = new List<Selectoption>();
    
            if (contactsFound.size() != 0) {
                Set<ID> existingContacts = GetExistingContactIds();
                
                for(Contact c : contactsFound) {
                    // don't add a contact if it is already on our list
                    if (existingContacts.contains(c.Id)) continue;
                        
                    String contactDescription = c.Name;
                    if (c.Title != null && c.Account.Name != null) {
                        contactDescription += ', ' + c.Title + ' - ' + c.Account.Name;
                    } else if (c.Title != null) {
                        contactDescription += ', ' + c.Title;
                        
                    } else if (c.Account.Name != null) {
                        contactDescription += ' - ' + c.Account.Name;
                    }
                    
                    foundContacts.add(new Selectoption(c.Id, contactDescription));
                }
            }
        } else {
            foundContacts = new List<Selectoption>();
        }
        
        return null;
    }   
    
    public PageReference addNew() {
        // search for the contact before adding
        String findContactName;
        
        if (newContact.FirstName == null) {
            findContactName =  newContact.LastName;
        } else {
            findContactName =  newContact.FirstName + ' ' + newContact.LastName;
        }
        
        Boolean matchFound = false; 
        List<List<Sobject>> contactSearch = [FIND :findContactName IN NAME FIELDS RETURNING Contact(Id, FirstName, LastName, Phone, Email, AccountId)];
        Contact [] contactsFound = ((List<Contact>)contactSearch[0]);
        
        if (contactsFound.size() != 0) {
            for(Contact c : contactsFound) {
                if (newContact.LastName == c.LastName && (newContact.Phone == c.Phone || newContact.Email == c.Email)) {
                    newContact = c;
                    addContactResult = 'An existing contact was found that matched your input.  This contact was added to the Sales Activity and can be seen by going to the Existing IMPACT Contacts tab.';
                    matchFound = true; 
                    break;
                }
            }
        }
        
        if (matchFound == false) {
            insert newContact;
            addContactResult = 'New contact created and added to the sales activity.  You can view this contact by going to the Existing IMPACT Contacts tab.';
        }
        
        newIMPACTContact.Contact__c = newContact.Id;
        insert newIMPACTContact;
        
        newContact = null;
        newIMPACTContact = null;
        
        return null;
    }
    
    public PageReference addOthers() {
        List<IMPACT_Contact__c> impactContacts = new List<IMPACT_Contact__c>();
        
        for (String opt : otherSelectedContacts) {
            impactContacts.add(new IMPACT_Contact__c(Contact__c = opt, Sales_Activity__c = salesActivity.Id));
        }
        
        insert impactContacts;
        
        return null;
    }
    
    public PageReference addFound() {
        List<IMPACT_Contact__c> impactContacts = new List<IMPACT_Contact__c>();
        List<Integer> optionsToRemove = new List<Integer>();
        
        for (String opt : foundSelectedContacts) {
            impactContacts.add(new IMPACT_Contact__c(Contact__c = opt, Sales_Activity__c = salesActivity.Id));
        }

        insert impactContacts;
        
        // go through the found contacts list and remove any contacts we just added
        // to the sales Activity
        for (Integer i = 0; i <= foundContacts.size() - 1; i++) {
            for (String opt : foundSelectedContacts) {
                if (opt == foundContacts[i].getValue()) {
                    optionsToRemove.add(i);
                    break;
                }
            }
        }

        for (Integer i : optionsToRemove) {
            foundContacts.remove(i);
        }

        return null;
    }
    
    public PageReference done() {
        PageReference salesActivityPage = new ApexPages.StandardController(salesActivity).view();
        salesActivityPage.setRedirect(true);
        
        return salesActivityPage;
    }



}

 
Hey there,

I am building a custom 'Customizable Forecast' tab from scratch using Visualforce and a custom controller to add some new features. One of my requirements is to forecast off of the 'forecast heirarchy' defined in the Setup->Build->Customize->Forecasts (Customizable)->Forecasts Hierarchy. Until now, I've used the UserRoleId Field to find direct reports and subordinate roles/users. How can I use SOQL to query the Forecast Heirarchy for Direct Reports and  subordinate users instead? I can not find any info on an object that contains this information.



 
Hey there!

I am new to visualforce and am currently recreating the customizable forecast tab to add some features needed by our exec team. My current question is in regards to recreating the top section of the page, seen belowootb customizable forecast - top section

Currently, I have added the new features to the page and I have to data stored in a list of lists of a class defined as forecastValues. I'll include the data structure code below.
public class forecastValues {
    public Decimal quantity{ get; set; }
    public Decimal revenue{ get; set; }
    }
public List<forecastValues> forecastCategValues{get; set;}
public List<List<forecastValues>> monthlyValues{get; set;}

        Public static forecastValues initializeForecastValues(){
            forecastValues fv = new forecastValues();
            fv.quantity = 0; fv.revenue = 0;
            return fv;
        }

        Public List<forecastValues> initializeforecastCategValues(){
            forecastCategValues = new forecastValues[5]; //one for each category: closed, commit, bestCAse, Pipeline, TOTALS

            for (integer i = 0; i < forecastCategValues.size(); i++){
                forecastCategValues[i] = initializeForecastValues();
            }
            return forecastCategValues;
        }


       Public List<List<forecastValues>> initializemonthlyValues(){
            monthlyValues = new List<List<ForecastValues>>();
            for (integer i = 0; i < integer.valueOf(selectedRangeLength); i++){ // one for each period in forecasting range: 1-6
                monthlyValues.add(initializeforecastCategValues());
           }
            return monthlyValues;
       }

So I have a <List<list<forecastValues>> monthlyValues where all of the data I'd like to display is located. From this point though, I would appreciate some help on how to display it in a visualforce table. I essentially have a groups of quantities and revenues that need to be associated with a month and forecast category on the page, but this information isnt explicitly noted in monthlyValues.

I would much appreciate any advice or help that you may have for me.  is there a way to manually name the rows and columns, etc??

Thank you!
 
So I have a set of three visual force pages. Each is a pageblock table showing results from custom controller that is limiting based on parameters passed from commandlinks on the previous pages. One of the limiting parameters is a datetime, however when I pass the parameter to the controller it comes out as a string. Either I am converting this somewhere (can the list<object> handle datetime fields?) or the visualforce page is converting the datetime field to a string that looks like this:

Fri Nov 30 21:55:38 GMT 2012

And I need to either cast this back into a datetime variable or figure out how to pass it as a datetime. Any help that could be provided would be really appreciated! 

 Here is my controller:
 
public with sharing class attendance_class_joins {

    // an instance variable for the standard controller
    private ApexPages.StandardController controller {get; set;}
    // the object being referenced via url
    //private Lesson__c lesson {get; set;}
    // the variable getting set from the command button 
    public String className {get; set;}
    public String classTimeStr {get; set;}
    //public DateTime ClassTime {get; set;}
    
    
    //---------------------------------------------------------------------
    //Create list for student attendance of all active classes 
    //by using SOQL (seriously salesforce?) to generate list
    
    public ApexPages.StandardSetController activeclassList {
       get {
            if(activeclassList == null) {
                activeclassList = new ApexPages.StandardSetController(
                    Database.getQueryLocator([SELECT Name, Teacher__r.name 
                                              FROM Lesson__c 
                                              WHERE Inactive_lesson__c = False]));
            }
            return activeclassList;
        }
        set;
    }
    
    // Initialize setCon and return a list of records
    public List<Lesson__c> getActiveClasses() {
        return (List<Lesson__c>) activeClassList.getRecords();
    }
    
    
    // handle the action of the commandButton
    public PageReference processLinkClickSA() {
        System.debug('className: '+className);
        return page.lessonselection;
        //Now do something
    	 //go to page http://cs16.salesforce.com/apex/lessonselection
        //return null;
    }
    //------------------------------------------------------------------
    //Create the list for the lesson selection page.
    
    public ApexPages.StandardSetController classtimeList {
       get {
            if(classtimeList == null) {
                classtimeList = new ApexPages.StandardSetController(
                    Database.getQueryLocator([SELECT Name, Date_Time__c 
                                              FROM Lesson_Attendance__c 
                                              WHERE Lesson_ID__r.Name in (:className)
                                              AND Attendance__c = Null]));
            }
            return classtimeList;
        }
        set;
    }
    
    // Initialize setCon and return a list of records
    public List<Lesson_Attendance__c> getClassTimes() {
        return (List<Lesson_Attendance__c>) classtimeList.getRecords();
    }
    
    // handle the action of the commandButton
    public PageReference processLinkClickLS() {
        System.debug('className: '+className);
        //datetime classTime = DateTime.parse(classTimeStr);
        return page.takeroll;
    	 //Now do something
    	 //go to page http://cs16.salesforce.com/apex/lessonselection
        //return null;
    }
    
    //---------------------------------------------------------
    
    //serialize the date/time function gotten on the last page. 
    //datetime classTime = DateTime.parse(classTimeStr);
    //public DateTime classTimeStr() {
    //datetime classTime = ApexPages.currentPage().getParameters().get('classTimeStr');
    //return (DateTime)Json.deserialize(classTimeStr, DateTime.class);
	//}
    //Create the list for the take roll page
 	public ApexPages.StandardSetController rollcallList {
       get {
            if(rollcallList == null) {
                rollcallList = new ApexPages.StandardSetController(
                    Database.getQueryLocator([SELECT Student_ID__r.Name, Attendance__c, Notes__c 
                                              FROM Lesson_Attendance__c
                                              WHERE Lesson_ID__r.Name in (:className)]));
                                              	//AND Date_Time__c = :classTime]));
            }
            return rollcallList;
        }
        set;
    }
    
    // Initialize Roll call and return a list of records from the above query.
    public List<Lesson_Attendance__c> RollCall {get {
        return (List<Lesson_Attendance__c>) RollCallList.getRecords();
    }}
    
    //Custom save functionality.
    public PageReference save() {
        update RollCall;
        return page.Test_Page;
    }

}
And here are my visual force pages
 
<apex:page controller="attendance_class_joins">
  <h1>Student Attendance</h1>
  <h1>Student Attendance</h1>
  <body>This is where you can take roll and check students attendance records.</body>
  <body>Please select the class series you would like to take attendance for: </body>
      
      <apex:form >
     <apex:pageBlock title="List of Active Classes">
          <apex:pageBlockSection columns="1" >
              <apex:pageBlockTable value="{!ActiveClasses}" var="c">
                  <apex:column headerValue="Lesson Name">
                      <apex:outputText value="{!c.Name}"/>
                  </apex:column>
                  <apex:column headerValue="Teacher">
                      <apex:outputText value="{!c.Teacher__r.Name}"/>
                  </apex:column>
                  <apex:column headerValue="Choose Class">
                  	<apex:commandLink value="Next" action="{!processLinkClickSA}">
                        <apex:param name="classNameParam"
                                    value="{!c.Name}"
                                    assignTo="{!className}"/>
                  </apex:commandLink>
                  </apex:column>
                </apex:pageBlockTable>
          </apex:pageBlockSection>
      </apex:pageBlock>
    </apex:form>


</apex:page>




<apex:page controller="attendance_class_joins">
  <h1>Class Selection</h1>
  <body>Select the individual meeting of {!className} that you would like to take attendance for:</body>
      <apex:Form >
    	<apex:pageBlock title="List of {!className} Sessions">
          <apex:pageBlockSection columns="1" >
              <apex:pageBlockTable value="{!ClassTimes}" var="d">
                  <apex:column headerValue="Date/Time">
                      <apex:outputText value="{0,date,yyyy-MM-dd HH:mm:ss}">
                          <apex:param value="{!d.Date_Time__c}"/>
                          </apex:outputText>
                  </apex:column>
              		<apex:column headerValue="Choose Class">
                  		<apex:commandLink value="Next" action="{!processLinkClickLS}">
                        	<apex:param name="classTimeParam"
                                        value="{!d.Date_Time__c}"
                                		assignTo="{!classTimeStr}"/>
                  		</apex:commandLink>
                  	</apex:column>  
              </apex:pageBlockTable>
          </apex:pageBlockSection>
      </apex:pageBlock>
    </apex:Form>
</apex:page>


<apex:page controller="attendance_class_joins">
    <h1>
        Take roll call, select the correct attendance value from the dropdown for each student and add notes where appropriate. Then click save to commit.
    </h1>
    <apex:form >
        <apex:pageBlock title="Roll Call" >
            <apex:pageMessages />
            <apex:pageBlockButtons >
                <apex:commandButton value="Save"
                                    action="{!save}"/>
            </apex:pageBlockButtons>
            <apex:pageBlockTable value="{!rollcall}" var="stud">
                <apex:column headerValue="Student">
                    <apex:outputText value="{!stud.Student_ID__r.Name}"/>
                </apex:column>
                <apex:column headerValue="Attended?">
                    <apex:inputField value="{!stud.Attendance__c}"/>
                </apex:column>
                <apex:column headerValue="Notes">
                    <apex:inputField value="{!stud.Notes__c}"/>
                </apex:column>
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>