What you are describing that you are doing is similar to what I've done very often lately. So I am pretty sure that the problem you are dealing with is a typo or mistake.
Here is a simple way to do what I understand you are asking for using an Agg node:
Input:

Agg:

Note that the second parameter of the joinStrings() function indicates whether or not to include Nulls in the result.
outputs[0]["DPTs"] = group.joinStrings(fields["DPT"],False," | ")
Output:

------------------------------
Ernest Jones
Precisely Software Inc.
PEARL RIVER NY
------------------------------
Original Message:
Sent: 04-19-2024 17:44
From: Daniel Pisani
Subject: Create a Temporary List or Set in Transform Node
Hey all,
I've gotta be missing something very easy, so hoping someone can share some wisdom. I'm using a Transform node to go through a list of tickets. Each ticket can have anywhere from 5 to 20 rows with various datapoints, and one of those is Department. I've written a calculation to look when a ticket gets assigned to a Department, and if it's the first time it's ever been assigned there, write a Status of New. If it's ever been there before, it is simply Assigned. So I thought my idea would be that at the beginning of a new ticket I'd create a new list that was empty, and whenever a row of data has Department not null, .append that Department to the list. And when I reach the end of a ticket, it wipes the List back to blank. Long story short: when I go to add to the list, I get a message that my Transform node has no attribute for .append. So I tried to make a Set instead, but when I go to .add() to it same error that there is no attribute. Is creating a temp list like this and adding to it simply not possibly ?
------------------------------
Daniel Pisani
Knowledge Community Shared Account
------------------------------