Table Load More not loading all Records

  • 3
  • Problem
  • Updated 3 months ago
  • Solved
  • (Edited)
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.
Photo of Menachem Shanowitz

Menachem Shanowitz

  • 1,094 Points 1k badge 2x thumb

Posted 5 years ago

  • 3
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 12,352 Points 10k badge 2x thumb
Official Response
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.