cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
duffletmc
Frequent Visitor

Salesforce Get Items ODATA Filter Apostrophe Issue

Hi there,

 

I have a flow which is taking the account name field from Salesforce via the connector, then using get items with an ODATA filter to find the relevant account in a SP list

 
 
 

SF ACCOUNT.PNGgetitems.PNG

 

This works fine for account names with no apostrophe in, but I get this error (using an example of McDonald's Corporation') when they contain them

 

The expression "Title eq 'McDonald's Corporation'" is not valid. Creating query failed.
clientRequestId: 9c24c620-41b9-4f62-8875-dd4a54ffed17
serviceRequestId: 9c24c620-41b9-4f62-8875-dd4a54ffed17

 

What would be the best way to make this query work, ideally without changing the original name in Salesforce? 

 

1 ACCEPTED SOLUTION

Accepted Solutions
rohsh354
Community Support
Community Support

Hello,

 

Please refer to the thread below for the solution:

 

https://powerusers.microsoft.com/t5/Building-Flows/Using-a-value-with-a-single-quote-as-an-Odata-fil...

 

Single quote in OData Query need to present in pairs.

To replace a single quote in an dynamic OData Query String value where the example field is Department.

 

replace(items('Apply_to_each')?['Department']?['Value'],'''','''''')

 

I hope this helps !

 

 

View solution in original post

1 REPLY 1
rohsh354
Community Support
Community Support

Hello,

 

Please refer to the thread below for the solution:

 

https://powerusers.microsoft.com/t5/Building-Flows/Using-a-value-with-a-single-quote-as-an-Odata-fil...

 

Single quote in OData Query need to present in pairs.

To replace a single quote in an dynamic OData Query String value where the example field is Department.

 

replace(items('Apply_to_each')?['Department']?['Value'],'''','''''')

 

I hope this helps !

 

 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,566)