Table only returning 20 rows
# 🤝help
b
I have a table where I need to look up rows based on inputs from the user. I saw that the suggestion was to have a selector get all the rows and then filter down the rows as needed. I'm trying this and it works, except that the 'all' selector only returns 20 rows. I'm using this code to get the records:
Copy code
const recommendations = await Recommendation_Table.findRecords({
  selectorName: 'all'}
);
and then filtering to the records I actually want using statements like this:
let recFiltered = recommendation.filter(record => record.condition.includes(condition));
I couldn't figure out why certain conditions were giving me the default until I walked it back and saw
recommendations
only ever has 20 records - this has me at a total dead-end, any help is appreciated!
a
@witty-football-93730 is there a limit of 20 rows for selectors?
w
Hey 👋, Whenever you query records by code, the default limit is 20 yes but you can easily control paging as such
Copy code
ThatTable.findRecords({selectorName: 'all', limit: 1000})
You have auto complete in the built-in code editor, just hit ctrl+space as you would do in a normal code editor

https://cdn.discordapp.com/attachments/1144060182150787162/1144269227797262427/Screenshot_2023-08-24_at_9.56.55_AM.png

b
Ah, thank you! I looked for pagination in the documentation and didn't see anything but didn't think to try autocomplete to look for other parameters.
75 Views