Forum Discussion
Get data using REST API Ringover - POST method
- 5 years ago
Hello PhilipTreacy
Finaly my colleague Data Architect found the solution.
The LasIdReturned in GetPage row 24 "LastIdReturned = try List.Last(Json[#"call_list"])[cdr_id] otherwise 0," was in conflict with all the "LastIdReturned" before.
So he have rename all the "LastIdReturned before" by "LastId" and now it's works very well.
Thank to yo again for youur time.
BR
Julien
Hi Julien7438
I'm a bit confused. Does this work or not? Is the issue just that you are getting the first list duplicated?
If that is the case then your initial conditions for res in List.Generate may need to be changed.
()=>[i=0, res = GetPage(0)],
Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.
Hi PhilipTreacy ,
Thanks for your answer, the code don't work and do exactly what you say.
I tried different way using this topic but i can't figure that.
Your right the iteration part have an issue.
Thanks a lot, i will investigate in this way, if you have any suggestion, let me know.
BR,
Julien
- PhilipTreacy5 years agoSuper User
Hi Julien7438
Can you be specific about how it's not working. Is it generating an error? Is it giving you unexpected results? Can you share what output the query does generate?
regards
Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.- Julien74385 years agoNew Member
Hi PhilipTreacy
For example if I set the StartDate parameter to "2020-10-27", the query will generate a number of lists, precisely 42 which is normal because each list contains 100 records (rows) and I know the database has generated 4200 rows since that date (42 * 100).
But in reality I have the same unique list 42 times, so when I remove the duplicate I only have 100 rows (my first list).
I didn't find how to share a photo or screenshot, so, I hope I was clear.
Thanks again for your time.BRJulien- Julien74385 years agoNew Member
Hello PhilipTreacy
Finaly my colleague Data Architect found the solution.
The LasIdReturned in GetPage row 24 "LastIdReturned = try List.Last(Json[#"call_list"])[cdr_id] otherwise 0," was in conflict with all the "LastIdReturned" before.
So he have rename all the "LastIdReturned before" by "LastId" and now it's works very well.
Thank to yo again for youur time.
BR
Julien