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?
lakshman
(Ganta lakshman)
November 3, 2021, 7:03am
2
@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) .
lakshman
(Ganta lakshman)
November 3, 2021, 7:11am
4
@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 .
system
(system)
Closed
November 6, 2021, 7:39am
11
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.