Code for complex query
# 🤝help
Hey there, I believe that you just replace the filter with that. I can check later today, but you should try first 🙂
Copy code
const limit = 10
const startRow = 0
workflow.records = await DataTable1.findRecords({
  offset: startRow,
// Checking the second page
const secondPage = await Data1Table.findRecords({
  filter: AI`everything`,
  offset: startRow + limit,
workflow.hasNextPage = secondPage.length > 0 // This flag can be consumed in your bot flow to handle pagination