Click activity with "each row from excel" variable

Hi folks!
can someone help me finding the correct way to put a variable into my click activity? Can’t figure out why it isn’t validating into the selector editor’ prompt.

Based on an excel datatable, i’m trying to make sequencial clicks in a website form, and each click will spam an extra-form with many fields to be filled. So i have an excel column for click activity’ details (a click variable), and i also have columns regardind the info to be fed into these extra-form’ fields (this extra-form closes by itself when you click save, at the end of the for-each-row routine).
So, when UIPATH makes the first click and fills all fields, it supposed to move on to the next click, as written into the variable in excel.
Thing is: all buttons are the same name. in the UI Explorer the original parameters are as follows

My excel column for the click’ variable (named as indexbutton) is iterating with parentid shown above, which seems to be the only way to iterate with the other buttons from the website (the text list:0 starts to change into list:1, list:2 and so… for other buttons).
Considering that, i’ve made the excel column to be as:

click 1 - form:list:0:j_idt37 - data 1 - data 2 - data 3
click 2 - form:list:1:j_idt37 - data 1 - data 2 - data 3
click 3 - form:list:2:j_idt37 - data 1 - data 2 - data 3

set to assign the click as
buttonselector = row.item(“indexbutton”).ToString

trying to apply the variable into the selector:

Still, when i try to validate it, only get redflags here.
does parentid parameter can’t be used as a variable? where am I going wrong here?
Sorry if it’s a rookie’s doubt, newhouse here.

in the UI Explorer the original parameters are as follows

< webctrl aaname=‘ui-button’ parentid=‘form:list:0:j_idt37’ tag=‘SPAN’ / >

trying to apply the variable into the selector:

< webctrl aaname=‘ui-button’ parentid=‘{{buttonselector}}’ tag=‘SPAN’ / >

Hi,
As index value will change every time.

  1. There is no need of excel here to create variable.

  2. Now coming to the solution part, try below method.

Take a assign activity and index_row = 1

In the for each loop

Ui explore take the element and pass your variable in div as highlighted in below screenshot.

assign activity index_row = index_row+1

You can apply the variable in the selector as mentioned above by opening the selector for the click activity, finding the parent id control and in the Edit Attributes window, delete text next to the aaname value, press “ctrl+k” and select the value that you have saved the custom parent id value in. You can just put this in a for loop and it will click for each of the values.