
Announcements
Hi all,
In my HTTP Get request, I am trying to $filter by an expression using a replace() function on a string that includes a single quote. The string is an email address, and some addresses come in the below format:
walter.O'Tool@email.com
The string comes from my current item which is:
items('For_Each_Contact')
I know this is probably so basic, but having researched online I still can't seem to get it correct. Following this blog: How to use string with apostrophe (') in Power Automate filter query (tomriha.com), I have tried:
replace(items('For_Each_Contact,"'","''''")
I have also tried variations of it but still get a retuned error message that the expression is invalid.
{
"error": {
"code": "0x0",
"message": "Syntax error at position 32 in 'crde0_username eq 'walter.O'Tool@email.com''."
}
}
Has anyone struggled also with this could point me in the right direction?
Many thanks,
Frank
Hi @FrankKelp,
The function replace also expects single quotes for its own parameters. I see you used double quotes instead.
Can you try this expression?
replace(items('For_Each_Contact'), '''', '''''')