Trouble Casting Integer into Array

Hello, I am training myself in RPA and getting error messages while assigning values to variables. I am attempting to write a simple break activity, executing one iteration with one integer variable and one integer array variable.

When I run the activity I receive this error message.

The materials I am training from haven’t covered this problem, and might be a couple of years out of date so I’m not sure if casting or software is the problem.

Hi @MikeinCT,

It seems like the type argument assigned for the loop is “System.Int32[]”. Please change it to “System.Int32” and try again.

Warm regards,
Nimin

I gave that at a try and received this error message.

image

image

Hi @MikeinCT,

Could you please share the screenshot of the activity, which encounter this error?

Thanks,
Nimin

hi @MikeinCT,
I think array variable in your flow is arrX so change x to arrX

This works well. I’m still learning this language so simple mistakes can hold me up quite a bit. Thank you for the help.