web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Problem to set value t...
Power Automate
Unanswered

Problem to set value to a drop down list on web page

(0) ShareShare
ReportReport
Posted on by 44

 ¡Hello there!


I got this problem in PAD, in which I can set the value of the drop down list because always said can find the option name (but the name it's correct). Also try to get the ID but still not working.

 

 


1.png

2.png

3.png

Drop down List of the web pageDrop down List of the web page

List ItemsList Items

UL ListUL List

7.png

8.png

Second examples changing the variables and drop down setsSecond examples changing the variables and drop down sets

I have the same question (0)
  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    The Set drop down list value in web page only works when the drop down list is an element of type <select> that has a list as its child. What you have there is not a <select>, but a <div>. As such, it won't work. That's just because of the way the web page is built.

     

    What you must do in a case like this is either use JavaScript, or a combination of several actions in PAD:

    1. Press button in web page to press on the drop down to expand it.
    2. Extract data from web page to extract the entire list that appears when you expand the list.
    3. Loop through the list until you find the value you want, so you can get its numeric index in the entire list.
    4. Press button in web page to press the list item you need, based on the index.

    You will need to modify the selector of the list item for step 4 to work. The selector will need to use the index of the item as a variable. See here for more reference on how to do that: https://learn.microsoft.com/en-us/power-automate/desktop-flows/build-custom-selectors

    Also this tutorial video: https://www.youtube.com/watch?v=2PcyBa22Jj8&ab_channel=Thomas%22Shaky%22Petersen

     

    They don't really cover your exact case, but at least show you how to modify selectors, as well as include variables in them.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • Celaque Profile Picture
    44 on at

    Hello!
    I tried to make the suggestions, but the result was the same where I tried by index and name (parameters) in the selector but I still don't have an expected answer.

    Result of the flowResult of the flowSelectorSelectorLOOPLOOP

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    For variables to work in selectors, you need to enable the Text editor toggle there:

    Agnius_0-1697866608351.png

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • Verified answer
    Pavel_NaNoi Profile Picture
    1,074 on at

    No, you don't, where'd you get that idea from? variables work regardless of text-editor mode.

     

    Anyways, the issue here is that he's using the "Title" attribute which 9 times out of 10 never works, if he wants to do it via index, he needs to use "Ordinal" attribute. However I'd recommend doing the following as honestly should be standard at this point in the community when dealing with web selectors:

    -Use "Extract data from webpage"

    -Extract one of the dropdown values

    -Select "Advanced Options"

    -Examine the selector it produces, in your case it'll probably be something like html > body >div >div >div > div >ul >li, to get the list item you need you just need to change this to html > body >div >div >div > div >ul >li:contains(%YourVariableHere%) Note: test this without a variable first, write any dropdown value in-between the () brackets. then take this, simply copy it, go into any UI Element / Selector, select "Text Editor" toggle and paste your selector into it, now anytime you call upon this selector it will dynamically select the dropdown item you want based on your variable.

     

    Hope that helps.

  • Celaque Profile Picture
    44 on at

    Thank you very much for your help, it has been very useful.

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Variables not working in the visual editor mode has been a known bug in PAD for years. If it works now, it's only possibly because of some of the latest updates fixing it.

  • Pavel_NaNoi Profile Picture
    1,074 on at

    Fair enough!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard