Inaccurate record count using template if records exceed 10

  • 1
  • Problem
  • Updated 4 years ago
  • Not a Problem

I have a table component with nested drawers that allows me to do a quick search for a Role and # of assigned users.

The assigned users is a template on the parent table (userrole)

The syntax is {{Users.totalSize}} 

The issue is that the # of user count is anywhere from 0-50 but the max number displayed via the template is "10". How do I fix this?

Photo of kavita maharaj

kavita maharaj

  • 160 Points 100 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Pat Vachon

Pat Vachon, Champion

  • 45,854 Points 20k badge 2x thumb
Looks to me like you're using a child relationship on the model used in the table that has the drawer. If so, the child relationship has it's Max # of Records.

Photo of Zach McElrath

Zach McElrath, Employee

  • 55,248 Points 50k badge 2x thumb
Pat is correct --- if you want to show more than 10 records, then you will need to increase the max number of records. Make sure if you do this, though, that you limit the number of fields that you are querying on that Child Relationship --- querying for lots of Child Relationship records can make your queries return lots of data really fast! Only get the data and fields that you need.
Photo of Chelsea Hirschton

Chelsea Hirschton

  • 324 Points 250 badge 2x thumb
Thanks so much Pat and Zach! We changed the properties of the child relationship on the parent model and bam! it's now showing the accurate count.