![]() ![]() When the code they NEED to end up with is as follows. Users accidentally drop the question mark (?) in the code that denotes HTTP request parameters…and unfortunately end up with the following code. Įlse Json.Document(Web.Contents(""&, ])),// retrieve results per call In modifying this code (and attempting to drop the portion that queries a view directly). some users of the code would try to modify the code to query the table directly, and overlook the importance of the question mark / accidentally delete it from their code.And I didn’t realize until just recently what was causing people to complain that “the code is not properly paginating”: Some code that I shared and modified here was written to query not just a table, but a particular VIEW on a table. The code that is giving problems is indeed the dropping of the question mark. These codes are taken from the threads linked in my OP, and they both seem to work for some people but not for others, and I can’t tell what’s causing the difference. Doing so returned a list with two record values that contained the same first 100 rows and the same offset value, as well as the same 422 error message as above. I tried a variant here of putting square brackets around Last_Key in the Json.Document line after the “else”. The error message: “Web.Contents failed to get contents from ‘ /?api_key=&offset=itrWGE6HxX4Gy6zmP/recUWbGV3D.’ (422): Unprocessable Entity” The offset: itrWGE6HxX4Gy6zmP/recUWbGV3DLz7DPS6 WebCall = try if <1 then Json.Document(Web.Contents(“ /?api_key=”)) else Json.Document(Web.Contents(“ /?api_key=&offset="&Last_Key&"”)), // retrieve results per call Before Facebook, Raymond had a 20-year career building productivity products as an engineering leader at Microsoft. He previously served as VP of Engineering at Facebook, launching Messenger and scaling the app to serve more than 1.3 billion people. ![]() Pagination= List.Skip(List.Generate( () =>, // Start ValueĮach null, // Condition under which the next execution will happenĮach, // Start ValueĮach <1 then “” else otherwise null,// determine the LastKey for the next execution Raymond leads Airtable’s engineering and technical teams. Without a better understanding of how it does what it does, I can’t figure out why it’s not working. I’ve tried the code in this link, and it’s returning the first 100 records, an offset record, and an error message. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |