Using a dynamic varibale in selector and get the value from Config file

Hello everyone,
I have a tactile application, on which I will enter numbers, each number on the application has a different id and title. I wanted to put in the config file the value of the id and the title of each number, so that I can retrieve it from my activity in order to click with the mouse on the number that corresponds, someone has an idea how I could it To do?

@sarra.meziane1

Welcome to our UiPath community.

Have a look below thread.

1 Like

the variable is already created, how I could use it from the config file? and did you understand my problem because i am not talking about how to create a variable in a selector

Hello @sarra.meziane1 :slight_smile:

Is the selector you want to click dynamic? If it is, click first the selector. Then go to “aaname” or “innertext” and change the vaule of this attribute for this → aaname = ‘{{Variable}}’

image

I hope it helps!

thanks for ure answer, in the selector I have two variable which change each time: “aaname” and “ctrIid”, I created two variable aaname=‘{{variable1}}’ Ctrlid=‘{{variable2}}’, now I want to add the value of Variable1, and variable2 in config file, who cad do this ?

Each time you get the two variables you can use write cell activity. Before writing cell act use:

  1. Read range activity – Var_DT
  2. Assign activity-- Var_Counter = Var_DT.Rows.Count.ToString
  3. Write Cell act – = Variable1 / Cell: A + (Var_Counter +1)

If it is not what you want, it would be better if you could share with us your workflow :slight_smile:

Thanks!

You don’t need all these extra variables to assign the Config values to. Just use string concatenation.

"<webctrl aaname='" + Config("somekey").ToString + "' />"

Unfortunately this doesn’t seem to work, although it would be nice if it did:

"<webctrl aaname='{{Config("somekey").ToString}}' />"