How can I pass a List from Invoke Code to UiPath WorkFlow?

Hi!

I need to do a code using the Invoke Code activity. But I faced a problem which is how to get a list that was created in a Invoke Code?

Please see the image below:

When I run this I get this error:
Invoke code : Exception has been thrown by the target of an invocation.

Can anyone help me?

Hi,

You must initialize list1 variable before using it as IN argument. And you dont need to initialize salmons variable in the code block once you initialize list1 variable out of the code block. Please find the attached screenshot

2 Likes

Thanks @mageshbala90, it worked. :slight_smile:

KR,
Francisco