So I created a controller that pulls the name of the user and 2 custom fields to show in a table (with some criteria in it). I create a visualforce page to show this table in a dashboard. I know the table has 30 rows but the dashboard only shows the top 10 rows. If I order asc or desc I can see the top 10 or bottom 10 rows and there are accurate the problem is, it won't show me the whole table. How can I do that?

This is the controller:

I'm just trying to show 40 rows but only 10 show up:

public class UserLoginDate {
    public list<User> userloginList{get;set;}
    Date daysago = Date.today().adddays(-30);

    public UserLoginDate(){
        userloginList = [SELECT Browser_Last_Login__c,FirstName, LastName, Name FROM User WHERE IsActive = True AND Browser_Last_Login__c <=: daysago AND  ORDER BY Name DESC LIMIT 50] ;


VF Page:

 <apex:pageBlock title="Wall of Shame">

   <apex:pageBlockTable width="100%" value="{!userloginList}" rows='40' var="s">
   <apex:column value="{!s.Name}"/>
   <apex:column value="{!s.Browser_Last_Login__c}"  />



  • 1
    It may be worth showing your code here. The only thing I could think of is that you're limiting your query to pull in 10 records but it couldn't possibly be that, could it? – Dan Jones Dec 10 '15 at 16:05
  • There you go..I just added rows=40 but still showing 10...not sure how to fix it. If I do a System.Debug with the list in a for loop I can see the 40 rows, but only with System.Debug – Leo Dec 10 '15 at 16:11
  • Can't you use a report to do this? – powlo Dec 10 '15 at 16:33
  • I would love to, I just can't figure out how to show the name of the user in 1 column and the Browser Last Login Date (date field) in another column in a dashboard, once I have that report created. – Leo Dec 10 '15 at 16:35
  • when is method userLoginDate() called? any chance that userLoginList is set elsewhere in some other method? – cropredy Dec 10 '15 at 19:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.