问题
I am trying to create a simple logic app to send email if the a field is true.
The flow is:Get Items From SPO (1) > Filter Array (2) > Send Email (3)
(1): This step, I want to have a quick filter to limit records returned from SharePoint Online:"queries": { "$filter": "preproccessed eq true" }
(2)(3): another filter applied, then send email
The (2) & (3) run just fines, but the (1) doesn't work at all, all records returned regardless of the filter. I even tried this:"queries": { "$filter": "preproccessed eq 1" }
But it doesn't work.
Anyone has any ideas what I missed here? Thank you.
回答1:
Currently the OData filter is not supported correctly by the SharePoint Online connector, resulting in all rows being returned regardless of the specified filter condition.
As a workaround, you can use the Filter array
card to filter the records in the Logic App itself (or use the Query
action type if you are authoring your logic directly in code view).
{
"type": "Query",
"inputs": {
"from": "@body('Get_items')?['value']",
"where"": "@equals(item()?['preproccessed']?['Value'], 1)"
},
"runAfter": { "Get_items": [ "Succeeded" ] },
}
来源:https://stackoverflow.com/questions/39321088/filter-query-odata-in-logic-app