Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Iterative Macro - Pagination Issue

AKPWZ
8 - Asteroid

Hi Everyone,

There was a small issue/logic I stuck in, and your assistance would be greatly appreciated.

I have an API(dummy) below
https://api.subapi.com/v1/lists/111/contacts/all?count=500&vidOffset=16566401

In this API i want to keep changing the vidOffset value with new one to get the another lists of data.
But when I'm adding a new value its not replacing the old one, instead getting appended with the old one and it coming like this 

https://api.subapi.com/v1/lists/111/contacts/all?count=500&vidOffset=1656640118161151

 

could you please help me on this how I can handle it?

 

 

API.PNG

 So my logic is if there is has-more = 1 then start the loop and append the vid-offset to the url.
So the first logic is :
1. [JSON_Name] = "has-more" OR [JSON_Name] = "vid-offset" => its giving me the above screenshot result.
2. Then in the formula tool I'm using two logic:

(a) COLUMN Name = offset => 
 [JSON_Name]="vid-offset" then [JSON_ValueString]
else Null()
endif

(b) Coulumn Name = api => https://api.subapi.com/v1/lists/111/contacts/all?count=500&vidOffset=

[api]+[offset]

2 REPLIES 2
AKPWZ
8 - Asteroid

I got the solution for this.
Instead of using [api]+[offset] in the formula tool, I used the complete url string and then append the [offset] variable to it.
'https://api.subapi.com/v1/lists/111/contacts/all?count=500&vidOffset='+[offset]
:)

Dhruvi7_EZD
5 - Atom

Can you please attach your Workflow for reference?

Labels
Top Solution Authors