I have built a model that is supposed to search for given strings from an excel sheet inside an internet browser. It search, finds and downloads to the correct folder. I have made an “image exists” boolean variable so that an IF statement provides the for each to begin the search further if the correct image does not exists.
BUT, when it have search through the rows in the excel sheet as a “row.item.tostrin” the “For each” loop just contiunues. Before I putted in the “IF” statement it searched thorough all lines and jumped out of the for each and to the next assignment, but now I am stuck in the “For each” for ever…
How can I break this without using BREAK, becaus this does not work when using a IF statement inside a “For each”.
For each company, company 1,2,3 etc I want to search on x-numbers of items. When all items are searched for and downloaded it is supposed to start all over on company numer 2. I have made an IF statement when searching for the items since not all items is given for all comanies.
It works fine without the IF, but then it is no worth to me. So i need to complete the search for items wit the IF and then breake the for each and move forward.
I have read other topics, but found no solution to this.
See attached… I dont think te variable 1 is the problem? It gets data from the sheet correct elsewhere in the workflow, but when arriving the “IF” it does not come out of the “For each” to get to the next one.
It can sometimes happen that Read Range will read many more rows than it should, I simply wanted to see your Range selection for that activity If it is just two double quotes, it can be that it reads many more empty rows and then tries to do your action for those empty rows.
One more question, if I in one place gets data from collum A in excel and it only has 3 rows of data, and another place I have 7 rows of data in for example collum B. How to get it to stop on row 3 in collum A?
Say collum A(Row0) is in one “for each”, and collum B(Row1) is in another “For each”.
Range in this example will be A1:B7, and it will get data from every A row, but no data in all of them.
If you mean to only load first three rows, why not use range "A1:B4"?
It should load the following rows:
If I didn’t get it right, please clarify
Another way I can think would be to load each column to a separate Data Table, with two Read Range activities. You can simply state for the first Read Range to read A1:A4 and for the other Read Range to read B1:B7, both into separate Data Tables.
You have to put your two Read Range activities right after each other. Right now the one at the bottom is never executed.
They need to follow the arrows, so:
Start → Read Range 1 → Read Range 2 → Open Browser