Using "array of string " in switch activity in uipath

Hi ,

I am trying to use array of string in switch activity but while entering data in cases (in string ) i am getting error as " case key value cannot be converted from/to type string".

could you please say what values will be accepted in cases if dealing with array of string?

@Shubham_Arya

Welcome to our UiPath community.

You mean want to pass Array of String as Case value here ?

No,

As in screenshot you can see In Expression i am passing Array of string (i.e item) , But in cases i am passing String value(i.e as Files) .

@Shubham_Arya

Can you please elaborate more about your input and what you are trying to achieve here.

If your case value is String then select Type Argument as String instead of Array of String.

1 Like

Hi @Shubham_Arya

Try changing Type as String!

Regards

Hi ,

When i change type to string i am getting below error message .

actually i have data in array of string(i.e- item) from which i want to iterate using for loop.

and in item i want to use switch activity and depending upon the value i want to perform my action.

@Shubham_Arya

Change the type in for each as a String because in your case you re iterating the Array of String and Setting the Switch Condition I Guess?

If am right then change in both for each and switch condition as String!

Regards

thank you @pravin_calvin .

Working fine now .

Hi @Shubham_Arya

Happy Automating! :grinning:

Regards

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