Forum Discussion

WillBatesHydro's avatar
4 years ago
Solved

Infinite loop in pagination (API)

Hi All,    Hope you are well,    Probably a really simple explanation but just can't work it out for some reason.    So I have a loop for my API to iterate over as many pages that are available...
  • mahoneypat's avatar
    4 years ago

    Looks like your condition is never returning null. I would try a hard-coded call with a page # well above the max to see what is returned (perhaps an empty table, but not a null). You probably need to change your condition to something like this.

     

    each List.Count([Result][response][results]) > 0,

     

    Pat