Unable to cast object of type 'OutSystems.HubEdition.WebWidgets.DynamicImage' to type

Hi team,

I have an aggregate and 2 local variables of list type. I am trying to append all "Aggregate.List" to 1st local list and then append all 1st local list to 2nd local list (both are of same structure). 

However I am getting these errors

Unable to cast object of type 'OutSystems.HubEdition.WebWidgets.DynamicImage' to type 'OutSystems.HubEdition.WebWidgets.TextBox'.  and

Detected a recursive iteration over the same list.


Any help would be appreciated. 


Thanks


Hello Angel.

How are you doing it? That error is from using a Loop.

You can do remove the loop and do a simple ListAppendAll from Aggregate to List1 and then ListAppendAll List1 to List2.


ListAppendAll is a system action.



Hello Angel,

I'd suggest for you to use the ListAppendAll function instead. Basically, you will avoid to use any loops.

You can just do a ListAppendAll from Aggregate.List to 1st local variable and then another one from 1st local variable to the 2nd local variable. In this scenario, you don't need to use loops.


Kind regards,

Rui Barradas

That's what I meant.

Editing now, thanks for the heads up Rui.

No problem Nuno. I had the feeling that we were on the same page.


King regards,

Rui Barradas

Nuno Reis wrote:

Hello Angel.

How are you doing it? That error is from using a Loop.

You can do remove the loop and do a simple ListAppendAll from Aggregate to List1 and then ListAppendAll List1 to List2.


ListAppendAll is a system action.



Hi Everyone, 

Thanks for your suggestions. But the issue is I don't have any loops in the flow I only have 2 ListAppendAll.


Also I noticed that on removing the first AppendAll, its fine.

Thanks



Hello Angel,

Can you share your OML so we can take a look?


Kind regards,

Rui Barradas