Failed dynamic selector

Hi All
I’m trying to select one of the selection as below, but it may be different each time .
do I tried to use dynamic selectors, make the aaname a dynamic value.
but it failed to select the selection when the assigned aaname contains “&”, while others can success.
Is there any methods to solve this problem? Thanks you in advanced

image
image

Hi @ChangShuang

Is alliances part of string or Excel values

Thanks
Ashwin.S

it’s a string value.

Hi @ChangShuang

Then give aaname as ‘"+Alliances.ToString+’"

Thanks
Ashwin.S

I changed the aaname=‘“+Ind_Sub_Segment.ToString+’”
Ind_Sub_Segment is a string value too.
but it give a error message like this…
image|528xx252

Remove &quit and don’t click on the button of selector within property change it as ‘"+Ind_Sub_Segment.ToString+’"

Thanks
Ashwin.S

I changed the selector like this but it give another error message .
“”
image

It can success when the sub_segment doesn’t contain a “&” character , but it will fail when the sub_segment contain a & in it .
such as
Strategy & Risk will faill while strategy Industry will success

Hi @ChangShuang

In the last give it as '"

Thanks
Ashwin.S

Hi ,
I tried this method ,but it still didn’t work when the Ind_Sub_Segment contains “&”
uipath may recognize is as a special character.

that’s strange… It maybe “&” changes “&amp” can you check Alliances data value before using selector?

yes, it changed to"&amp" in the selector property.

Aha!
I think, You Don’t need to Change Your Selector.
image
if Alliances value type is String, just change Alliances value “Alliances.Replace(”&“, “&”)” before Select.

like this.
스크린샷(25)

Thank you a lot I solved my problem by using replace method.

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