Using a variable in a selector

Hello.

From my experience, you can’t use the Selector Editor to add a variable into the selector. You need to use the Expression editor. Basically, your selector is stored as a string, so you want to edit it while it’s in that format (ie surrounded by quotations)

If you click inside the Selector property, you will see that it is a string surrounded by quotes:
image

So edit that string. One trick you can do is remove the “<” character first, then when you click the “…” edit button, it will open the Expression Editor to make the edit much easier (remember to place the character you removed back in there though).

The other half is identifying the attribute that contains the words you want to replace with a variable.

Your selector might end up looking like this:

"<webctrl aaname='*"+variable+"*' />"

where I used a wildcard also to make it more robust.

Anyway, I hope I am clear and this helps.

Regards.