I'm trying to add some record IDs to a text variable (collection), and I'm doing something wrong with my loop. Get Records and the loop iteration seem to be fine, but I'm incorrectly assigning the IDs both ways I've tried to map the elements.
One assigns a single ID and then exits, I get why it does that.
The other assigns ID "A", and then IDs "A" and "B", and then "A", "B", "C" and so on.
What can I do to make it add each ID, just once, to my variable, so that I have a text list of IDs that would be substantially the same as what the Get Records returns?
#Flow
Your assignment element needs to connect back to the loop element, that's the problem with first screenshot. Auto layout is good for this.
To stop adding duplicate IDs you can include a decision element inside your loop where you check if your text collection contains the current id being iterated on. If yes, then loop through next item, if no then add the id to collection