cancel
Showing results for 
Search instead for 
Did you mean: 

Extracting Specific Text

GowthamBopaiah
Level 5
Hii,
How To Extract Values Before and after A Specific Text from collection which has read email body



------------------------------
Gowtham Bopaiah
------------------------------
3 REPLIES 3

EmersonF
MVP
Hi GowTham, are you okay? Have you tried using Regex?
Can you give me more details of your problem?
------------------------------
Emerson Ferreira
Cons, Intelligent automation
Avanade Brasil
Recife
+5581988869544
If my answer helped you? Mark as useful!
------------------------------
Sr Cons at Avanade Brazil

Take an Excel file with (Columns: Name, Employee ID, Email, Date of Joining), Fill 50 rows with random data. Using BP, filter the excel file to get those data whose date of joining is after Jan 01, 2022. 

Application Excel.


Here this is the mail body which is stored in collection under body field (extracted using ms outlook vbo). I want to extract data   after Application separately  and the data before application separately in a collection  




------------------------------
Gowtham Bopaiah
------------------------------

I think what you're saying is that you've got a list of emails in a collection. Whilst in that collection, you want to split the email body into two fields 1 for everything before Application, and one for everything after.

If so, by far and away the easiest method is add a new field to your collection (called something like Body2). Then loop through the collection and use a multi-calc stage to extract the text you want;
the first row of the multi-calc stage would need to extract everything to the left of Application, maybe something like Left([email.body], InStr([email.body], "Application")) and safe this into email.Body2
the second row of the multi-calc stage would need to extract everything else and save it back into email.body. Again, various ways to do this; think I'd simply remove everything that I've always split out, something like Replace([email.body], [email.Body2], "") and save back into email.body

Once your loop has finished, you'll end up with the Body field in the collection split into Body and Body2, with Application being the delimiter.

I hope this makes sense.

------------------------------
John Wilding
Robotic Architect
ReAssure Ltd
Europe/London
------------------------------