Practice 3—Switch and For Each

First hello to all and thank you for any help in advance,

So i’m going trough the Automation Dev Training and got some problems on the Control flow model exercise 3.

Already checked with log messages and the for each cycle is going through the array of errors correctly extracting each one correctly, but i’m having problems saving it in the new separate string, studio outputs a “Assign: Value cannot be null. (Parameter ‘first’)”.
Maybe i can´t do it all in the assign activity?

This is what i’m using in the assign “errorAx.Concat({errorC}).ToArray”. Print follows:

Ps: Already roamed in some threads to find an answer without any luck.

@joaquim_calado_2

errorAx is having null value as default
And your using that variable in the expression

What is the need of concating errorAx to the array errorC.Because it is having null value.

@Shiva_Nikhil

Thank you for your answer Shiva, the objective is save several errors separated by the initial code on separate arrays of strings(Ax,Bx,Cx). I used(not well obviously) that piece of code with the concating because it was on the course materials.

My experience from several years was mostly programming on c++, so i would just use an int variable as a counter to increment positions on the errorAx array and save the value each time from the errorC. That said was trying to learn a diferent like on the course materials, do you have a sugestion to implementing it that way?

Thank you

use debugging and its panels for tracing and prototypings

ensure that all XY Arrays are not null and maybe initialized with an empty value like new String(){}