Paginate Response

Options
Leon Barth
Leon Barth Member
edited May 2023 in ? Transforming data

Hi everyone,

Just wanted to know if there is a quick way to paginate a response.
As you can easily do when you query a record table →

https://docs.xano.com/working-with-data/functions/database-requests/query-all-records/external-query-manipulation/external-paging

I modify and sort my output quite heavily. So querying all records with the native paging function is not really an option.

Comments

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Hi, not sure if I understand. What kind of filtering and sorting are you using? Are you sure that those cannot be done in query itself? Then you can easily go with built-in paging.

  • Leon Barth
    Leon Barth Member
    Options

    @Pawel Magdanski.

    the data relevant for sorting comes from a nested list + it is related to a specific language code.

    The products are filtered (to keep the explanation relatively simple) primarily by a popularity score, which is nested deep within a product (and varies by country).

    The customer plans to go into thousands of products, so I wonder if there is an easy way to paginate a response (in much the same way that table queries can be paginated)

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Have you considered using Join for related tables? Then you can still filter via custo query

  • Leon Barth
    Leon Barth Member
    Options

    great idea. I'll consider it