GOAL: take email output from a system that generates a sales order and update the row in Excel that is applicable to that order.
Example: We receive this email from a system, it will always be "UniqueKey" "PO" "Order Number". it could be 1 order or be 5 etc.
Ill use the Unique Key and find that row in excel and populate the Order Number in column26
Sample data below
SPE2D623F9U6Q-1-F5402G SPE2D623F9U6Q 0000022508
SPE2D623F9U6Q-2-F5402G SPE2D623F9U6Q 0000022508
SPE2D623F9U6Q-3-F5402G SPE2D623F9U6Q 0000022508
Here is Inbound email body
I will say i had a bit of issues with the HTML format, in the end i chose to not use the HTML to Text convert.
I removed the Tabs /t with decodeUriComponent('%09')
I removed the returns /r/n with decodeUriComponent('%0D%0A')
I removed the blank spaces at end with filter array.
I thought about doing a count of lines (because it will always be different number of lines) then just loop through each line grabbing the Split(First( and find the record then update it with Split(last( of each line, but i thought this might be a lot of work and not be efficient or fast.
but i thought maybe it would be easier to somehow format each line and turn into json then do the loop to find each element? but im struggling after this because its considering each line a string.
Looking for some options on what i can do, would it be best to try and format everything if so how would i do that?
Thanks,
Dex