Skip to main content

Hi All

 

I have a URL in the format http://blah.com/images/{index] where the maximum index value will be the total number of records minus 1. So for three images the indexes would be 0, 1, 2

What is the best way to take the attribute imagecount and loop to the URL for the correct number of times starting at zero???

 

Just getting a bit confused now....

Regards

 

This is often referred to as "pagination" and you can find a pretty good tutorial here:

https://community.safe.com/s/article/Getting-Started-with-API-Pagination

 


If you know the image count before the call, you can clone to that number (3), this will then assign a copy number (0,1,2) to each feature and you can use that attribute to formulate the url and then send three requests that way rather than looping.

 

I'd only use looping where a value from the previous call was required for the next call


If you know the image count before the call, you can clone to that number (3), this will then assign a copy number (0,1,2) to each feature and you can use that attribute to formulate the url and then send three requests that way rather than looping.

 

I'd only use looping where a value from the previous call was required for the next call

Thanks very much, that worked fine....all this time with FME and still learning!!!


Reply