Question about how Iterator will act in the following situation

Status: Closed · Asked by greco26 on · 0 views

greco26 — Question ·

I have a get request and most of the time the data is returned in an array so in the next step Iterator does its job and parses out the array. That part is perfect. What happens though when the get request only returns 1 record and is not an array? I assume Iterator will not do anything since the data is not an array. Does the whole workflow then stop since nothing can get past Iterator in this example? Is there a way to get around this situation?

Thanks!

Tim

Fagun Shah — Reply ·

Yes, the whole workflow will stop if iterator doesn't get the array.

Is there any other information coming in as well e.g. Result Count or something similar

Fagun Shah
- Automation Freelancer
- Let's Connect - https://www.facebook.com/fagun.shah.7/
greco26 — Reply ·
Yes, the whole workflow will stop if iterator doesn't get the array.

Is there any other information coming in as well e.g. Result Count or something similar?


Hi Fagun, thanks for your response. Result count from the Iterator step or from the get request? Unfortunately there is no response from the Iterator step since it won’t even run but for the get request, there is no result count field. Just a field for each key and its value from the get request.
Fagun Shah — Reply ·

GET request response. Iterator step won't be showed in history and won't execute if it doesn't get the array from above steps.

Fagun Shah
- Automation Freelancer
- Let's Connect - https://www.facebook.com/fagun.shah.7/
greco26 — Reply ·
GET request response. Iterator step won't be showed in history and won't execute if it doesn't get the array from above steps.

No, there is no result count field from the api get request response. Just a field for each key and its value from the get request. I’ve attached a screenshot.

Attachments

IMG_0739.png
Fagun Shah — Reply ·
No, there is no result count field from the api get request response. Just a field for each key and its value from the get request. I’ve attached a screenshot.

That is bad API practice, you need to contact action app developer, not a pabbly connect issue.
Fagun Shah
- Automation Freelancer
- Let's Connect - https://www.facebook.com/fagun.shah.7/
greco26 — Reply ·

Yea, bummer. I'm wondering if there is a way for me to have a validation step which checks if the reply from the API is an array (like =ISARRAY() ) then use a router to determine next step. If array, then go to Iterator, if not array then continue. Not sure if this would work under the Pabbly Numbers tool but I can't think of anything else.

Back to all forum threads · Log in to reply