cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DaveBrom
Level: Powered On

Cannot filter on SharePoint field to compare to Salesforce field

I'm trying to build a Flow that will trigger based on a modified record in Salesforce and then copy that record info to a list item in SharePoint. This works on a basic level, but I need to filter the record coming from Salesforce in order to avoid duplicate list items in SharePoint. When the list item already exists, I want to do an update instead.

 

So I'm trying to use a Get Items and an Odata filter to compare any of a few possible field names from the SharePoint list to its related Salesforce field. However, I can't get the filter to recognize the SharePoint field name as a field name, instead it just treats it as a text string.

 

Here's how it's configured:

 

ssflow1.jpg

But when the flow runs it always fails with the following error:

 

"status": 400,
"message": "The expression \"Title eq Customer Account 1\" is not valid.\r\nclientRequestId: e7876844-0df5-4b83-9abd-d8e597baabee\r\nserviceRequestId: ba44ae9e-5050-0000-1cb0-36a01983e7b9"
}

 

As you can see, it pulls back the value of the Salesforce account name, but I can't pull the value of the SharePoint field to compare with it. It simply equates it to the text of Title that I typed in.

 

Also, I notice that when creating the filter, dynamic content for Salesforce fields is available, but nothing for SharePoint. Is that expected?

 

Thanks for any help here!

Dave

2 REPLIES 2
Community Support Team
Community Support Team

Re: Cannot filter on SharePoint field to compare to Salesforce field

Hi @DaveBrom,

 

The format of Filter Query should look like this:

ColumnName eq ‘String’

You could try adding single quotes outside of Dynamic content, like:

82.PNG

Please take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
DaveBrom
Level: Powered On

Re: Cannot filter on SharePoint field to compare to Salesforce field

Hi Barry,

 

Thanks, I actually did try that already, but it doesn't make any difference in the outcome. Similar failure message, but now with single quotes around the dynamic content value being returned. The issue seems to be more with the ColumnName not being evaluated or related to anything - it's just treated as a static string value.

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (5,482)