cancel
Showing results for 
Search instead for 
Did you mean: 

How to handle Apostrophe in Subject Line

sapna_soni0290
Level 5

Hi Team,

I have a scenario. I have 5-6 different subject lines which may come in the email. I want to store all of them into Enviornment variable via comma separated. In two of my subject lines apostrophe is coming in like - "Diner's club add". How can i pass this value of subject line with apostrophe into it as an input parameter to my email utility to extract the received emails. 

I am planning to first get the value from env var into a collection. So i have a collection with 1 column & 6 rows. I will use loop to get to the rows. The problem is its not able to pass the specific row which has  apostrophe. Getting Error -
Internal : Could not execute code stage because exception thrown by code stage: Cannot parse condition. Error at "@SQL=urn:schemas:httpmail:subject LIKE '...".


12 REPLIES 12

HI Sapna Soni,

If I understand your question you want the result collection  having exact match "Diners club add"?  and discard other emails?

-----------------------
If I answered your query. Please mark it as the Best Answer

Harish Mogulluri

LakshmiNarayan3
Level 6

Hi

The filter is already using "like" operator so basically it is like wild card and case will be ignored and i guess you no need to pass any "*" along with subject

Try passing you subject in lower case 

also check in the code "@SQL=urn:schemas:httpmail:subject LIKE '%yoursubject%'" in this manner

Regards
Lakshmi Narayana

Morning Sapna

Another option would be to use the BP provided "Utility - Strings" and remove (delete) all punctuation from your text.  This way any other unusual email subjects would also be dealt with within the single process step:

35551.png

These are the characters to delete (with associated quotation marks - ","".""!"":"";""'""""""-"

As with all things RPA, there is always more than one solution.

Brgds
Ian

Ian Meldrum Senior RPA Developer Royal Surrey NHS FT UK