Table Load More not loading all Records

edited June 29 in Problems
I have a table that is loading Campaign Members, the model had a LIMIT of 20. There were 106 members in the Campaign and Skuid was only (eventually) loading 66 when clicking Load More. 

I looked at the table SOQL and discovered that there were two reasons why this was happening:
A. The first load more was using an OFFSET that was double the LIMIT. So if the limit is 20, it initially loads with no offset and then load more loads an offset of 40 instead of 20.
B. If there is no ORDER BY specified, OFFSET doesn't work properly in soql.

When I added an ORDER BY it loaded 86 (point A) and as I kept lowering the LIMIT it was increasing the amount that was eventually loaded with Load More (point B).

Interestingly, on my Account table Load More seems to increase the soql LIMIT to 10000, so perhaps the issue would not exist there.


  • Rob HatchRob Hatch Skuad ✭✭
    edited September 2016

    This is an issue we see from time to time and seems to originate direclty from the Salesforce's Standard Set Controller.  Its happening beneath anything that Skuid can control. 

    We have usually been able to create a workaround though.  If you add a second field to your model "default order by" property it seems to reliably return the correct number of values. The code we put there was:  

    We are exploring with Salesforce and others whether this issue is in their code or our implementation.   We hope to have it fixed soon, but in any case the workaround is available for you and should solve the immediate problems you were facing. 

  • JaimeJaime Member
    edited May 2018
    Hey Rob,

    Is there an update on this issue? 

  • PaulPaul Member
    edited September 2019
    I'm seeing this behavior despite having several fields in the "Fields to order records by" field on the model.  If I put the max at 200, I get a resultset of 142.  If I put 80, and "load more", it gives me 136 with no option to load the missing 6.

    If I search, the missing records will come back in the result, but are otherwise lost to the user.

    Any suggestions?

  • Khamla PhimmachackKhamla Phimmachack Skuid Mod, Admin admin
    edited September 2019
    I was not able to reproduce this problem in our latest version of Skuid. Can you tell us which you are on? Also, can you copy and paste your page XML here for us to investigate further?
  • Mark DeSimoneMark DeSimone Skuid Mod admin
    edited February 4
    Hi Paul, I wanted to see if you could grab the model's SOQL query. That's available by opening the browser's developer console, and entering the command, then clicking on the model you're troubleshooting. The SOQL statement should be within, and if you copy and paste it into Salesforce's Developer Console and execute the same query, it might tell us something about why you're seeing the behavior. 
  • PaulPaul Member
    edited December 2018
    It's a lot of custom fields, some of which are a bit revealing in a way I'm not comfortable sharing here - can I email it to you?
  • DaveDave Member ✭✭
    edited September 2019
    Hi Mark, I have the same issue.
    If I sort by a specific Field and Load More it only loads 9 more records(model loads the first 200 by default)  but there are 70 more which are supposed to be loaded...
    If i remove that sort order or use a different field , it seems to work no problem.

    I entered the SOQL Statement in the Dev Console and it returned all 270 records perfectly.

    I am on a older version of Skuid (10.0.23) but never had this issue with any other table as far as i know..

  • Mark DeSimoneMark DeSimone Skuid Mod admin
    edited February 4
    Hi Dave. I've heard of some similar behavior in the past though I've not seen it happen myself. The recommendation in those cases was to sort by a field that's always unique, like the record's unique Id field. I think you can do this in addition to other 'sort-by' fields you need. Can you try this out and let me know if there's a difference in behavior? I might also recommend getting a sandbox spun up on a newer release of Skuid to see if the behavior is different. 
  • DaveDave Member ✭✭
    edited September 2019
    adding the ID as 2nd sort seems to have fixed issue, thx
  • Mark LMark L Member ✭✭
    edited June 29
    I'm having a similar issue here, in particular when using a specific table filter. I have a model loading 100 results, when I select a particular table filter and then select Load More, the load more button goes away and I still have my 100 results even though there should be 188 results returned.

    If I remove the ORDER BY from my table, it doesn't seem to help in this instance. I still get only 100 results and can't load more for the rest.

    It seems to only sometimes happen dependent on what filter conditions I specify on the table. It would be difficult for me to send over XML of this happening as it's pretty deep in custom objects / our specific data to illuminate the bug happening.

    SKUID v12.1.7, API v1
  • PaulPaul Member
    edited May 12
    I'm seeing the same behavior - did you ever find a resolution to this?

Sign In or Register to comment.