I am buildig a flow, and need to put Odata filter, when try to get items in the SP list.
I need to filter this SP list by 3 paramenets , Car number, Month, Year. Please,could you help me to bulid filter. I have tried to do it at least by one parameter ( see screenshot attached), but it does not work
Solved! Go to Solution.
Hi @Galina73 ,
So this is the key point!
It's not supported to compare text column with a lookup field value directly.
The syntax should be like this:
internalFieldName/Title eq 'Lookup Value'
internalFieldName/Id eq 'Lookup Id'
In your issue , you should try:
columnname in list2 eq 'columnname in list1/Title'
This similar issue may help you:
Assuming that the name of your SharePoint columns are CarNumber, Month, and Year, the OData expression to return a record with CarNumber of 'ABC', month of 6, and year of 2020 would look like this:
CarNumber eq 'ABC' and Month eq 6 and Year eq 2020
I assume you want to call this Flow from PowerApps, so you would replace these hardcoded values with 'ask in powerapps' parameters.
Hi @Galina73 !
ODATA queries can be quiet tricky for the first time, but it sure has logic behind it.
As you can see in this image I took, you can notice 3 points:
-you can chain ODATA filter parameters with the " and " keyword,
-around dynamic content you have to surround the parameter with single quotation marks,
-if you have a column in Sharepoint with space in it's name, you have to replace it with "_x0020_"
In your example it would look somewhat like this:
Car_x0020_number eq 'carNumberParam' and Month eq 'monthParam' and Year eq 'yearParam'
You can learn more about ODATA on the following links:
You seem to have forgotten to place single quote marks around the value. Its always necessary when you use strings as parameter even from the Dynamic content window.
In the attachment there's an accepted expression.
Hi @Galina73 ,
Firstly please check whether you've entered right column name.
Secondly, could you show me how do you set the dynamic part?
Here's a doc about how to Use dynamic ODATA Filter values in a Microsoft Flow SharePoint GetItems Action in details, please refer:
Check out the on demand sessions that are available now!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.
Features releasing from October 2020 through March 2021