Filter Query (OData) in Logic App

笑着哭i 提交于 2021-02-11 06:13:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!