Modify Powershell script to report separate lines for a specific condition
I would like to change the attached script to match the Desired Output.
When an "Item" which reports a "Part P on G",
and the same "Item" is found which shares the same "Code", then the "Item" and "Qty" which is reporting the "Part P on G"
must be reported on it's own line, as shown in the "DesiredOutput" file.
For example in the Current Output file you will see:
3 744 12-12121 Desc2 8 0 1 2020/OC/03=744
But the Desired Output must show it separately like this.