Select Item Activity not working when the string has space

Hello everyone,
I am using Select Item Activity to select a name from the drop down and I am passing a variable(array of string) and looping on it to select all the items in the array. When the string has spaces in it, select item fails to select that item although that item is present in the dropdown list. Can anyone tell me what the problem could be here.

Thank you

1 Like

@shivnagsudhakar

This might have caused :slight_smile:

Possible Solution

Remove the spaces

  1. using .Trim if the spaces are in the start & end.
  2. using regex to replace the space in between the words.

Regards,
Dom :slight_smile:

Dom,

Thank you for the response. But, If I remove the space they no more match with the dropdown list as the dropdown list has space too.

Thanks

1 Like

@shivnagsudhakar,
Possibly you can extract the items from drop-down using Find Children activity. And plan accordingly to select the matching one from your input.

Regards,
Dominic :slight_smile:

how exactly can I do that. We get IEnumerable variable from find children activity but after that?

@shivnagsudhakar, refer this,

Regards,
Dominic :slight_smile: