troubleshooting Question

Modify Powershell script to report separate lines for a specific condition

Avatar of Tek Info
Tek Info asked on
PowershellScripting LanguagesCOBOL
4 Comments2 Solutions136 ViewsLast Modified:
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.

3       672  12-12121   Desc2 8      0      0           2020/OC/03=672
4        72  12-12121   Desc2 0      0      1           2020/OC/03=72

What change needs to be made to the script tp report it this way?
OldScript.ps1
Source.in
CurrentOutput.out
DesiredOutput.out
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros