Dynamic Selector based on position in a list

Hi Community,

So I am struggling to create a dynamic selector to select folders in the File Explorer, based on a variable which would be the folder’s name. When I open th UI Explorer I have noticed that the selectors seems to be based not on the name of the folder itself, but on it’s position in a list.

you want to click on file based on file name ?

you can go with send var or Agument inside selector it will be more dynamic

I want to click on a folder based on its name, yes. But where would I edit the variable?

in example see the selector if your filename is in aaname then your selector should be aaname=‘{{varname}}’ like this first confirm the attribute then pass the var or arg

Hey!

Are we trying to get the files which is dynamic from the specified folder?

Could you please explain the process a bit more?

Why we’re trying to click on that file in explorer?

Do we have any particular reason to click on that file?

Regards,
NaNi

hi NaNi,

So the scenario is the following: I am looping through a folder in which there are a n amount of other folders. I need to open each folder, perform a number of actions and then change the status of each folder by modifying its name.

I have two for each loops, the first one is a for each folder in folder, and the second is a for each file in folder. When I go through the first loop, I assign a variable to the name of the first subfolder I am looping through. What I would like is to use that variable to have a ‘Click’ activity to select the folder dynamically based on the folder’s name. But it seems to me, from the screenshot, that the selctors is based not on the folder’s name, but on its position.

Hey!

Could you please explain what we need to do after clicking on that particular file?

Instead of clicking we can get that particular file if we use for each file…

I can give you the solution…

Regards,
NaNi

Hi!

there is no file that I need to click on this instance. I need to perform actions on a number of folders and then change their name. I basically open the File Explorer, navigate it based on a variable that contains the specific folder name that I am working on. My problem is that I am working let’s say on many folders, located in a zip folder which gets updated constantly so there are always new folders. I want to be able to be in the zip folder, and click on a specific folder based on a variable.

I’ll attach a screenshot that resamble my case.

Hey!

We can use rename folder as well…

No need to click on that folder…

Just you need to loop through the folders and use condition

Item.Equals("NameOfTheFolder")

Then block you can use Rename folder activity

Else block leave it blank…

Regards,
NaNi

Hey!

I am sure there’s more than one way to change the name of it, I have a solution already for it. I just wanted to see if I could get the ‘Click’ activity to recognize any given folder and click it. Thanks for your help!

hello @sebastiano_santini

as per the screenshot which you have shared you will have to make the attribute aaname dynamic by passing the folder name. but it would be always better to use the activity which supports backend operation than the Ui actions.

So better to use the Rename folder activity to avoid unwanted Ui errors.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.