Hi everyone, I’m in a bit of a fix. My issue is quite a complex one and I’ve been stuck with it for 2 days now.
A little backstory, I’m building a tool that takes an ID from an Excel sheet, goes into a website, searches for that ID - based on the ID, the items in the dropdown change dynamically.
So what I’ve done so far is this - Create Excel Application scope, Read range, and did a For Each Row activity. To the logic part of selecting from dropdown based on ID from excel sheet on the website, I used IF Statement something similar to the below:
For privacy reasons, I did not attach the actual build but it’s essentially the same as below (without the animals lol)
The issue now is after completing the first iteration, the value assigned to the variable “item” is being used for subsequent iterations.
For example, for 1st loop: uiPath takes ID “1234” from first row in excel, goes into the browser, enters the ID, dropdown brings back these items; “Rat”, “Cat”, “Fish”. from my if statement above, I’ve specified that “Rat” should always be chosen if “Rat” exists in dropdown items. So our variable item = “Rat”. This runs fine.
Now when uiPath goes into excel to take ID from second row (i.e. second iteration), variable item still remains “Rat”. E.g. if ID from 2nd row is “2345”, dropdown items change in browser and it could be “Cat”, “Dog”, “Fish”.
Logic in nested if statement says choose “Fish” but uiPath does not do that, it tries to find “Rat” from the first iteration instead of dynamically looking for “Fish”. Is there something I’m missing?
I’m not sure I’ve explained this well but I would appreciate all the help I can get. It looks like a minor issue but I just cannot figure it out.
To give you some background on the logic behind the dynamic selection of the dropdown items ; please see this link: Selecting values when dropdown items change based on input value - #11 by mukeshkala
Thanks in advance