Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.
Free Trial

Alteryx Designer Desktop Discussions

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

Help with a macro and/or API call

craigja
9 - Comet

Hi,

 

Im looking to call a web API and get some information on certain codes - I want the legal name from the LEI (Legal Entity Identifier) code...  I can call the API and get back the results I want but if I post more than 15 LEI codes, it splits the results into more than one page.

So... I either somehow figure out how to get all the results pages and then use a macro to loop round then, or I send them up in batches of 15 at a time using a macro.  Either way I need to use a macro!  

Im thinking of the later option, split my list of LEI codes into batches of 15 at a time, call the API with those 15 then union all the results together at the end.

Ive never written a macro before - can anybody give me some pointers on this?  At this point I have 28 rows with 1 column, the LEI code, how do I create something that will take in 15 at a time (I can then concatenate the 15 into a comma separated list and append this t the API call URL)

4 REPLIES 4
afv2688
16 - Nebula
16 - Nebula

Hello @craigja ,

 

you can use for that batch macros.

 

I have set up for you an example where each line fetches one result.

 

Regards

craigja
9 - Comet

Hi - I cant open it as we are still on 2020.2 

afv2688
16 - Nebula
16 - Nebula

Hello @craigja ,

 

Downgraded the version for you 🙂

 

Regards

craigja
9 - Comet

Excellent!  That pretty much looks like exactly what I want!  Thanks

Labels
Top Solution Authors