You don't "need" a script to do this - although you could use one if you wanted.
As it looks to me, you want to add a new record to your flow for every ID. Each row you create should have an increasing "sequence number".
So - Multicast your data flow.
Send output #1 to a Sort OR Aggregate component. Sort by ID, removing duplicates, and only pass through the ID column - or Aggregate (group by) ID. Send the Sort/Aggregate output to a Derived Column transform to add the date column, then to a
Row Number transform or a Script component to add the sequence number.
Send the Row Number/Script output to a Union All component. Send the Multicast output to the Union All component as well.
