Iterate through list in Calculated Element

Hello,

I am working on defining some data that I want to loop through to check for the values in the array. I am defining my array and keep getting an error. that it does not like the = sign when defining the array.

ex.
int [] type = {35,45,12,22}
if (type.Contains($lnType$) {
return $amount$
}
else {
return $alternate$
}

Error: syntax error near ‘=’ line 1

I seem to remember that Dundas Script does not allow initialising and populating the array in the same command. Try initialising it one one line and then populating it on the next.

Look at the end of section 2.4 on https://www.dundas.com/support/learning/documentation/cleanse-consolidate-modify-data/writing-data-scripts-with-dundasscript