Hi everyone!
I’m building an agent that evaluates AI recommendations for multiple clients from a .txt file. I use a while loop to process each client and append each loop’s output to a result list using a Set State node inside the while loop:
assign value:
type(state.result) == "list"
? state.result + [state.current_output]
: [state.current_output]
to variable:
result []
The problem: in the end node, I can’t return the full list. It either comes back empty or only the last item.
Has anyone managed to accumulate outputs from a while loop in state.result and return the full list? Any tips or examples would help!
Thanks!