Extract values for a text file using blue prism

aleeassad

New Member
Hi- I have a text file (see attached). I am using utility file management-read all text from file to store all the data from the text item in a data element. There are multiple lines with messages as below:
Material Message
D232ZLL SUCCESS M01: BOM flagged for resend, will be sent within one hour
D2330LL SUCCESS M01: BOM flagged for resend, will be sent within one hour
D2331LL SUCCESS M01: BOM flagged for resend, will be sent within one hour
D2332LL SUCCESS M01: BOM flagged for resend, will be sent within one hour
D2333LL SUCCESS M01: BOM flagged for resend, will be sent within one hour
D2334LL SUCCESS M01: BOM flagged for resend, will be sent within one hour
E0Q5LLL SUCCESS M01: BOM flagged for resend, will be sent within one hour
E0Q5MLL SUCCESS M01: BOM flagged for resend, will be sent within one hour

My goal is to extract the Material number for each status (Success) message. There can be other statuses as well in addition to "SUCCESS" like "FAILED" or "BYPASSED" For instance, for the first line, I know the status is SUCCESS for Material "D232ZLL". My goal is output all statuses and corresponding material numbers from the attached text which I can then save into another file. I do not want to do this using any excel or notepad VBO. I am fairly new to BP and will appreciate any guidance/feedback on how to do this. Thanks
 

Attachments

  • Log File.txt
    885 bytes · Views: 132

Malikabee

New Member
First split the data from text data item using split action whose output will be collection.
Now loop through this collection and put a decision if the collection row contains Success string or not using instr function.if it contains Success then get the text which is left of success and store the same in output collection.
 
Top