Select item under 2 list items

Hi everyone!
I need your help.
image|510x422
I want to select an item which is under 2 list items.
For each company, i want to select “Mission 2021” and if it doesn’t exist i will create it.
I tried select item but it selects the first “Mission 2021” found, not the one it supposed to select.
Thank you for your help

1 Like

Hey @Laetitia

Happy to see you here

Just add idx = 2 to the webctrl in your target selector of select item

This may help you

Let know for any queries

Thanks

@Nithinkrishna thank you for your reply. Can you tell me which idx i have to change?
Capture FORUM 1

1 Like

@Laetitia, Could you please show me the entire ui explorer screenshot by selecting your target element.

It will give broad view to give a better solution.

Thanks :slight_smile:

Sure!

1 Like

1 Like

@Laetitia, Could you please try adding in the last line

it doesn’t work.

1 Like

Expected :slight_smile: , No worries.

Could you please do one more help. Just highlight the element from the ui-explorer with the same selector as in the screenshot.

Please post that here to check which element it is highlighting.

Thanks

1 Like

Could you please use indicate element in UI Explorer and select your element - Mission 2021

Post the selector of that please.

We are almost there

Thanks :slight_smile:


i have idx 1 beacause i selected “Mission 2021” of the first company of the list. When i select the second one, i have idx 2 and so on.

1 Like

Exactly, you got it.

Now make that idx 2 for your scenario.

You need to always select the second item right, Correct me if im wrong.

Thanks :slight_smile:

Thank you for your hepl.
I tried that but it select the “Mission 2021” of the second company of the list.
Actually what i need is to select for each company its “Mission 2021”.
I have to make the idx dynamic so that it will select the right “Mission 2021”

1 Like

Yes right, you can pass the idx dynamically in a loop :slight_smile:

1 Like

Thanks! :slightly_smiling_face:
I’ll try and let you know

Hi @Nithinkrishna
I tried but it didn’t work. I tried something else that works.
Thanks for your help

1 Like

Try to remove the idx in the last line and just change the name by updating the last line to

<ctrl name='Mission*2021' role='list item' />

or if you want to pass in the name as a variable

<ctrl name='{{newVariable}}' role='list item' />