Setting Selected attribute of a Dropdown box list item based on the value attribute

Hi Forum, hoping there is a solution to this issue, as ChatGPT and the interweb have not prevailed.

Background:
I have designed a process that extracts data from a SharePoint site. The data extracted is based on the value of 3 dropdown boxes (Group, Division and Location). The items displayed in Divisions depend on the selection of Group, and the items displayed in Locations are dependent on the selection of Division.

Problem:
Some locations are displayed multiple times as they contain different types of data, and so have multiple list items of the same aaname. As data needs to be extracted from each of the locations, using the aaname only selects one of these multiple items, the same list item is selected on each iteration. Resulting in the bot missing data extracts.

Is there a way that I can set the ‘Selected’ attribute of a list item in the dropdown box by searching for the items value?

I cannot see an activity in UiPath that does this, I can only see a get attribute activity.

Screenshots are attached but unimportant data has been obfuscated. In this screenshot i have manually selected the list item with value 680 and the selected attribute is set to selected.

I would like to be able to set the list item 681 selected attribute to selected by searching for the value 681, and the same for value 682.
The image shows a snippet of HTML code featuring a dropdown menu with multiple options, one of which is marked as selected. (Captioned by AI)

I am taking these steps in the process for each dropdown.
-Click to open the dropdown list
-Find Children of the dropdown to get a list of UiElements
-Select Item using the Location name

This works but not for locations that have multiple entries. I know its bad design, but this is what they use so its what I have to work with…

Thanks in advance.

Hello @ParkerDH ,

Have you tried to do a get attribute of the dropdown and in property Explorer you have the attributes you can get and from there get the selecteditem.

Check this webiste as an example : https://codepen.io/miniven/pen/ZJydge

@ParkerDH

  1. Did you happen to use set attribute activity?
  2. Also you have a multi select activity which can select multiple items from list if list supports

Cheers

Hi @Anil_G

I did look for a Set Attribute activity, cause it seems strange that there isn’t one, as there is a Get Attribute activity :smiley: .

When I search in Activities in the Activities panel I only get the ‘Get Attribute’ and ‘Set Web Attribute’

image

I also cannot find this activity on the UiPath documentation.

Am I missing something?

With the idea of using above activity and setting the checked attribute on an option, we would have a strategy. Unfortunately we encountered that this approach was only partly reliable.

A following flow:

was working fine in production flows

However this is one of multiple options to implement it (motivated to click options with the same name/ but different option value attribute content

@ParkerDH

Set Web Attribute is the activity

cheers