Forum Discussion
Expression.Error: We cannot convert the value null to type List.
- 5 years ago
mahoneypat Anonymous I was able to resolve all issues replacing the "&" with "?". I am not sure of the reasoning behind it but I appreciate your time and help!
Thank you! I was able to convert it to a list however I am back at square one where it is only pulling 1k records. Do you know why it is not retrieving the next page of records?
Since you have the count condition in your List.Generate already, I'm not sure why you need the try ... otherwise. I would try it w/o that. Also, if you know how many records to expect, you could hardcode a list of numbers in, instead of using List.Generate (at least for troubleshooting).
Pat
- rachaelwalker5 years agoResolver III
mahoneypat can you tell me which try otherwise I should remove. I tried removing the one highlighted in yellow but now getting same error cannot convert to list. I appreciate your time and help. I know this is difficult not fully knowing my data source.
let Source = List.Generate( ()=> [Result= try PageData(1) otherwise null, PageNumber = 1], each List.Count([Result]) >1, each [Result= try PageData(PageNumber) otherwise null, PageNumber = PageNumber +1], each [Result]),- rachaelwalker5 years agoResolver III
mahoneypat Anonymous I was able to resolve all issues replacing the "&" with "?". I am not sure of the reasoning behind it but I appreciate your time and help!