For Each: Unable to cast object of type 'System.String' to type 'System.Collections.Generic.List`1[System.String]'

The casting Error

i’m not getting this error

why its occurring

kindly help

1 Like


I guess you selected Type Argument as List in For Each loop activity because of that you are getting this error. Please change it to String then it will work.


Specify Type Argument as String in the property panel of for each activity and then give a try.

And Make sure you are passing a array or list variable as input to for each activity and not just a string variable

Cheers @Syed_Shahbaz_Ali

Thanks Buddy ! Issue is resolved :slight_smile:

1 Like


Glad I could help. Can you please close this thread by marking relevant post as solution. So that it will help others who are facing similar kind of issue.

1 Like