Minimize the need of repeated range of numbers

Hi All,
I was able to get what I need with the HTTP request function with the help from here. And I would like to enhance it further.

image

As shown on picture. The link is always the same, and I had to type 10times the same link just because the no. sequence starts from 1000 - 1010, is there a way that I can hardcode 1000 ~ 1010 to the automation so that each time it runs, it will automatically retrieve the pictures from 1000 ~ 1010 without me repeating the link 10 times.

Thank you.

@Man_Kay_So

Can you please elaborate…is it that you are getting values using http request using a api? And each time you hit you get a number?

Cheers

Thx.

I am trying to download img from the link
|www…com/product_image/011/078/955/11078955_|1000.jpg|
|www…com/product_image/011/078/955/11078955_|1001.jpg|
|www…com/product_image/011/078/955/11078955_|1002.jpg|
|www…com/product_image/011/078/955/11078955_|1003.jpg|

And i had created a workflow for it to do by separating the link in to parts as

Where
StrURL = |www…com/product_image/011/078/955/11078955_
StrNo = 1000, 1001, 1002 … etc

image

The StrURL part will change according to different product, but StrNo. is fix number from 1000 onwards, my question is, will there be a way to better modify the workflow now, by putting only once the StrURL and it will go through all numbers from 1000 - 1020 and download the needed img.

By now, I have to make a excel chart adding each of the needed roll, and hoping to find a smarter way.

Thank you.

@Man_Kay_So

As you already know that you need to use from 1000 to 1020 use a loop on the urls you have stored first…then inside that loop use a for loop on Enumerable.Range(1000,21).ToArray. Change the type argument in for loop to integer…

Now use currentitem.ToString in place of strNo

Hope this helps

Cheers

Thank you. let me try to make it myself and if not able to, will come back and seek for assistant, again.

Thank you thank you.

1 Like

Hi,

FYI, in this case we can use Repeat Number of Times activity as the following.

Regards,

Hi Yoichi,

This is exactly what I want to achieve, thank you.
So, as I will have 5 different links, and each will have 20 pics (1000 - 1020), I can do a 2 time “For Each”,
first to read the 5 links and each go through 1000 - 1020, and comes to the 2nd link and so on.

Thank you, thank you , thank you.

1 Like

@Anil_G @Yoichi
Just want to come back and say thank you.
Both of you solved my question and save me from stupid double working for months.

Thx thx thx.

1 Like