0

I'm looking to use the Browser Automation section of Power Automate Desktop.

enter image description here

Specifically, I would like to do 2 things.

  1. Select Multiple Options
  2. Use wild cards

The website I'm trying to pull from us the US Bureau of Labor Statistics. https://data.bls.gov/cgi-bin/dsrv

enter image description here

I want to select Oklahoma & Texas at the same time. However, in my Power Automate Desktop, I do not want to include the 40 & 48 that precedes them.

I found an article about using wild cards, but in the end, the solution was to use a variable and a portion of the object was always known. In this case, it doesn't work, because I don't know why 40 was selected for Oklahoma, nor do I know if it will change in the future, making it hard to figure out how to store as a variable. It wasn't truly a wild card.

For issue 1, selecting multiple values. I was only able to achieve this by creating a list variable, and storing the items I want to select in the list. My question is, how do I format my string without needing to initial a list variable? enter image description here

Note: if I use the variable %StateSelections%, it works. I've manually written what is stored in the variable, and it fails.

My second question is, how do I format this for using a wild card? Ideally, I would be able to do something like [*Oklahoma, *Texas] but it fails. It also fails with [%Oklahoma, %Texas] and [[Oklahoma, [Texas].

1 Answers1

0

You need to initialize a list which has the states you want to select; you can do that using the "Split text" action. The produced variable from that action can be used in your drop-down action under the "Option names:" tab (Note: This is in case you are using the "Select options by name" operation).

The full flow would look like this: Full flow

The "Set drop-down list value on web page" action: Drop-down action in detail

  • Hello, I stated briefly that I was able to make this work using a list variable. My question is how do I add a wildcard. In this case, the value fails when you just have Oklahoma;Texas per your image. The real value is 40 Oklahoma;48 Texas. I need to know a way to wild card the 40 & 48 within the drop down options so that if these numbers change in the future, my code won't break. – MartyMcfly0033 Aug 15 '23 at 19:16
  • Understood, but from what I gather this mockup would work regardless of a code (number) change. The list variable only contains the state names which, likely, will not be changing for the foreseeable future. Nevertheless, if you want to write these values directly into the "Set drop_down list values on web page" action you can write the following: `%['Oklahoma', 'Texas']%` I tested this, it works - so I hope this helps :) – mfdoomfan Aug 16 '23 at 04:33
  • Thanks, but what about wild carding the drop down values? Again, in front of OK and TX is a random 2 digit number within the websites drop down menu – MartyMcfly0033 Aug 27 '23 at 14:09
  • I'm not looking to write the values to the drop down, I'm looking to select existing values from the drop down. The text will have to match perfectly. But in this case I'd like to match just in the state name. – MartyMcfly0033 Aug 27 '23 at 14:15