For Loop with Slight Variation

So I am trying to create a robot that files expense reports. I have no trouble getting the variable and inputting them except for a slight error. Below you can see an example of one. The robot correctly clicks the “+” button after it files one expense so that it can enter the next expense information on the next line. Unfortunately, the robot inputs the information into the first expense area and ignores the next expense area (Where it should enter). Is there something that I can put at the beginning of this for loop to detect if an expense has already been filed on that particular line and therefore switch to the next? I can think of using an “if element exists” activity with the red description box, but I don’t know how to select the next box. Any ideas?

Hi @mplo724

It is because you are looping on the same field, the first line only. Every line has its unique selector. You may see a difference on attributes, something like rownumber or idx, in which you need to modify every loop.

Your type into activity selector, inside the loop should look like:

for each loop
{
type into description, selector = <aaname=“expense type” idx=‘“+loopindex+”’>
}

1 Like