Overwrite a list variable

Is there a way to overwrite a list variable?
For example:
I have a double nested loop.
I have list of files, in each file I have a column of data.
For each file, I want to add the column of data as a row in a table variable.
Each iteration though, adds the previous iterations full contents.
So if i have 3 files, I have 3 rows, but the first row is one column of data, the second row is the first two columns of data combined, and the third row is the last three columns of data.

Hi @FunkyBunhcesOfOats could you share your recording or a screenshot of it to see the details?

I made a script that does it:

@CustomScriptAction(
	input = ['dimension']
	)
	
	def customScript() {
	dimension.clear()
	}

Just change ‘dimension’ to variable of your choice.

2 Likes

Hi

You might also want to consider This C.A. approach for nested if-statements that offers better readability where there are more than a couple of conditions.

You could modify the code to have the monitored words as inputs and a Boolean result if the logic is true. Just need to change the logic from arithmetic to string, or even a regex if you’re feeling adventurous!

1 Like

Thanks Bonnero,
I need to process a number of different reports. This is just the first one.
That will help.

1 Like