Forum Discussion
rsderby68
3 years agoResolver I
API Query looping and not stopping at null results? Help!
Hello Helpful Query Experts, I am trying to get data from a particularly troublesome API. It requires a POST command to get results and hides the total record information in return headers which...
- 3 years ago
Nevermind I figured it out. It was actually returning an empty list {} of all things which was causing the loop. Got it working now!!
ppm1
3 years agoSolution Sage
An empty record does not equal null (see pic below). Try using Record.FieldCount([Result])>0 as your condition instead.
Pat
- rsderby683 years agoResolver I
Is this what you are suggestion? When I run this I get this error. What am I doing wrong?
let
Source = List.Generate(()=>
[Result = try fTessPage(1) otherwise 0, tpage=1],
each Record.FieldCount([Result]) > 0,
each [Result = try fTessPage([tpage]+1) otherwise 0, tpage=[tpage]+1], each [Result])
in
Source