Using two variables in for each loop

I have two variables in a document of excel and I need to use these values in a For Each loop, for example:
the first value is a number of a client and I search this client on a website, the second value is a number of impressions.

I need to search the client and the second value in the same For Each loop.
In other words, the for each separate the values of the list in an element, and I need two elements

this image presents the elements

Sin%20t%C3%ADtulo

1 Like

Hi,

I have an excel sheet ( Column A has a list of policy numbers and B has subject-of the mail for renaming)

Im trying to open outlook and search using elements from column A, then forward that found email to a common address, however I’m kind of stuck when it comes to renaming the subject line of that mail (which is found on an excel in column B)…any suggestions ?
How do i incorporate a second loop?

The below code runs fine however it fails to rename the subject before forwarding the mail.

Would really appreciate some help.

1 Like

Hi @trisha @Gamaliel try the solution from this post

Thank you:)

I tried saving it to a table variable and then used a for loop and selected ${element[1]} the ${element [2]}. it seemed to work, however the bot is having issues using inspector, only the x,y position are working and not the window selector, is this a generic problem?, how do i go about accessing my mails since the x, y position are not very reliable.

1 Like

Can you share an example of a window selector that doesn’t work?

Also, do you have 1 or several accounts in Outlook?

i have one account.

The x, y position works only.

You need to have an action switching to the required Outlook window before the mouse click.

once? or before every mouse click?

The best practice is to switch to every new desktop window, but if other mouse clicks are performed in the same window there is no need to switch to it again.

Thank you , i will try that now.

1 Like

Hi @ashapkina

i have an doubt regarding for each loop.
i have stored some four numbers in one variable say x and some four elements in another variable say y and im looping thrught the numbers in both variable(x and y) and performing multiplication operation like x=1,2,3,4 and y=1,2,3,4.Now it is performing like for first time 1 multiplied with1,second time 2 multiplied with 2 etc…

Now i need to change the value of x after first iteration.for this im pausing the script and changing the value of x like x=1,22,3,4…and then im again resuming the script.Now for the second iteration it should take value 22*2 but it is not taking…**It is possible to change the input after some steps?**Can u help me in this.Thanks in advance