How to insert a variable in Selector for a click activity

Hello community,

I want to insert my own variable value in a specific xml attribute for an activity (inside the edit selector).


Can anyone help me on this?


Dear @John_D,

Below attached Image is an example of adding variable to selector.

Geet M

Thanks for your reply. I tried that but it throws an error

Compiler error(s)
Option Strict On prohibits operands on type Object for operator β€˜+’

Hi John_D,
Please find the below attached images for insert a variable in selector for click activity.
1.within the single quote type Ctrl +Space you can able to see the variables.
2. select variable which you need to insert variable and click on ok button.


1 Like

Thanks a lot. Yes, ctrl+space brought the variables inside.

I would like to ask one more thing, what if this activity is inside a β€˜ForEach’ and I try to use the β€˜item’ variable inside.
Any suggestion on this case?

@John_D In that case can you just try and check just by using aaname=β€˜{{item}}’ but make sure the variable item is of type String else you would need to convert it to a String and store it in another variable and use that variable. I am not sure if the selectors support Object variables better to convert to String.


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