user3482527
user3482527

Reputation: 247

Azure Logic App API Pagination using Until condition

Wondering if you could help with this problem please. I am ingesting data from an API using Azure logic App. I have managed to set up everything else but struggling with pagination in Until condition.Logic App continues to ingest/consume data and creates blank json files with data[]. I have added the screenshots (with and without data in the page). When data is completed, empty or blank page looks like data[]. Any idea what could be my condition in "Until" ?enter image description here

enter image description here This is how page with data looks like

This is the blank page (Page Number 4) without any data

Upvotes: 1

Views: 957

Answers (1)

Hury Shen
Hury Shen

Reputation: 15754

In your question I can't see the "Until" condition but just a "If" condition, but I think you just want to know how to check if the "data" field is empty and then do different actions (If I misunderstand your requirements, please provide more details and I will try to help you on it).

Please refer to the steps below:

1. We need to use a "Parse JSON" action to parse your json data, when click "Use sample payload to generate schema", you can put the json data which "data" field is not empty into it. And then it will generate the schema automatically.

2. Then we can use "length()" method in the "If" condition. enter image description here

The whole expression of "length()" method above is: enter image description here

Below provide the code for you to copy.

length(body('Parse_JSON')?['data'])

Hope it helps~

Upvotes: 2

Related Questions