"FillFromOther is not a valid operation inside a StartIteration/EndIteration block"

"FillFromOther is not a valid operation inside a StartIteration/EndIteration block"

  

As far as I was able to check, there are some actions that we can't use inside a For Each loop (remove, append). However, I can't find any reference to "FillFromOther" action, and I'm not being able to debug the intended espace (the right entry module is not displayed as option).

Any advice? 

Thanks


Maria,

It should be available. Open the entry point module as well the module you want to debug. If I'm not mistaken, it is required to the module to be open in northern to it to appear in the list.

Cheers,

Eduardo Jauch

Thanks Eduardo, but my doubt is related to the "FillFromOther" action itself. Either way I am not being able to debug the module where the error appears because it is about 5 layer deep in my code and for some reason I can't enter there.

Hi,

Related to debug, it must be a cascade. Module b in debug, entry point of a, c in debug entry from b, etc.

Related to actions in a ForEach, it is always a bad practice to change the list you are iterating.

If you need to do that, the pattern is to duplicate the list and iterate the duplicated list instead, doing what you need in the other.

Cheers

Eduardo Jauch

Hi Eduardo,

Is that what the "FillFromOther" is related to? Because I couldn't find any references about it in OutSystems documentation.

However, the fact is that I am not changing the list that I am iterating...

Hi Maria.

I have a couple of questions. 

1. Is this a mobile or web app? And which version (9? 10?).

2. The error message says you are trying to change a list inside a ForEach that iterates the same list. FillFromOther is not an OutSystems function/action. Is part of a library that OutSystems/some component use.

Do you have the error message from the logs in the ServiceCenter? You can filter by application, espace, date, etc.

Also, if you could provide an OML with the error to us to take a look, could help to detect the problem.

Cheers,
Eduardo Jauch

Solution

Hi Eduardo.

1. Web app, version 10

2. The action in question was only using actions from the System (for each, assign, etc), and therefore I still don't understand where does the "FillFromOther" comes from. Besides that, I was not changing the original list inside the for each...

I ended up making another action to encapsulate the logic inside the for each and it is fine now.

Thanks anyway,

Maria

Solution

Hello mariap,

Glad you found a workaround.
You could mark your answer as the solution, as it was the solution :)

Cheers,
Eduardo Jauch