How to select multi items from drop down by config file

Hello Team,
I want to select multiple items in drop down through config file.
Bot throw error as “String cannot convert to string()”.

I am using- in_config(“Multiselect”).tostring

Please help

@Jeeru_venkat_Rao

it needs a list

so you need to use split

in_config("Multiselect").ToString.Split(","c)

Assumption is comma is string separator in config…if not change accordingly

cheers

Hi @Jeeru_venkat_Rao
use in_config(“Multiselect”).ToString().Split(","c)
Split method to convert the single string from the Config file into an array of string

in_Config(“MultiFacilityNames”).ToString.Split(“,“c)
string[8] { @”{
““abc”””, @"
““ccd””“, @”
““ssd””“, @”

It shows the output in immediate window and throw the error.

It should be like–
{
“abc”,
“ccd”,
“ssd”
}

@Anil_G , its not working

Hi @Jeeru_venkat_Rao In config file values should be like abc,ccd,ssd

MultiselectName = in_Config(“MultiFacilityNames”).ToString().Split(","c).Select(Function(s) s.Trim()).ToArray()
try this let me know if its working
I am able to get the values what error you are getting can you share

@Jeeru_venkat_Rao

Remove those brqckets you dont need them

What error are you getting now?

Cheers

This is error which I am getting as per your current code-
Select Multiple Items - Results: Expression Activity type ‘VisualBasicValue`1’ requires compilation in order to run. Please ensure that the workflow has been compiled.

Uninstall and reinstall any relevant packages UiPath.System.Activities

Hi
Review the quotes, and replace them again for "
Also, UiPath does is not recognizing “ and ” characters, make sure to use "
I got this issue too - UiPath did not throw that error until running the workflow

Will try tomorrow and reply

Thank you everyone for your help.

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