Extract special text
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
20-07-18 06:58 PM
Hi guys,
I have another question for blueprism. I have to extract special text. The trigger to start the process is an E-Mail. In that E-Mail there is a text with a Standard form like this:
"Bitte ablegen.
Engagement Name: Testengagement 2018 Robot
Version: 2018V1
Mit freundlichen Grüßen,"
I have to extract and save the underlined text in a data type. The text can have different characters lenght.
Thanks in advanced.
Mareen
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
20-07-18 07:41 PM
With a calculation stage, you can use the InStr formula to find the position of ""Engagement Name:"" and ""Version:"". The underlined text should be between those two, it doesn't matter if it's on a different line.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
20-07-18 07:54 PM
Thanks Melissa, I will try it and let you know if it is working for me or not.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
20-07-18 08:06 PM
I tried this
InStr([Message Body]; ""Engagement Name:"" AND ""Version:"")
And I'm getting an error: Internal : Failed to evaluate expression 'InStr([Message Body]; ""Engagement Name:"" AND ""Version:"")' - Both operands for 'AND' must be flags.
What does it mean?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-07-18 06:38 PM
I don't think you can use AND inside the InStr formula.
I tried this one and it works:
Mid([Message Body], InStr([Message Body], ""Engagement Name:"") + 17, InStr([Message Body], ""Version:"") - InStr([Message Body], ""Engagement Name:"") - 20 )
Please note:
The +17 is because ""Engagement Name:"" has 17 characters, so adding those characters to the formula tells BP that you want the text after the end of that string.
Similar with the -20 at the end of the formula, the InStr will find ""Version:"" but you don't want to extract that word nor the spaces before it.
You might need to adjust the 17 and the -20 depending on the actual format of the email; if you have a HTML email for example, you might get tags like "", but if you adjust the 17 and 20 you should be ok.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
24-07-18 05:24 PM
It worked how expected. Thank you so much.
