Thank you for your answers. I stored your sample data into this Compose:
Then used this expression to get the Job Number: first(split(last(split(outputs('Compose_-_Source'), 'CHANGES FOR')), '->'))
Next, used a Filter array to remove the top column and the bottom ones. I'm using a split to transform the text into an array, where each line corresponds to an record, and then a to ignore the first line. In the filter query itself, we're removing any empty lines, or those which contain many *******:
From expression: skip(split(outputs('Compose_-_Source'), decodeUriComponent('%0A')), 1)
Filter Query expression (make sure to change it to Edit in advanced mode before adding): and(not(empty(trim(item()))), not(contains(item(), '******')))
Finally, in the Select we're transforming the array of lines into an array of objects, containing the Part number and the Qty for each record. In both cases, we're working with a split function passing 4 blank spaces (or a tab) as separator, and then accessing the respective element. For the Qty, we're also transforming it in an integer number (if you prefer to keep it as text, just remove the int function from there):
Part number expression: split(item(), ' ')[1]
Qty expression: int(split(item(), ' ')[0])
Outputs
Job number
Parts and qtys
Let me know if it works for you or if you need any additional help!
✅
If this solved your issue, please mark it as Accepted Answer.
👍
If it helped, feel free to give it a like!
🌐 Explore more Power Platform content on my
Website or on my ▶️
YouTube
💼 Find me on
LinkedIn