在SharePoint连接器上使用筛选器查询 [英] Using the Filter Query on the SharePoint Connector

查看:128
本文介绍了在SharePoint连接器上使用筛选器查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在获取文件(仅属性)"上,对于SharePoint连接器的操作,我想使用过滤器查询来防止文件夹作为结果的一部分返回.

On the "Get files (properties only)" action for the SharePoint connector, I'd like to use a filter query to prevent folders from been returned as part of the results.

如果我尝试以下查询,它将失败:

If I try the following query it fails:

""{IsFolder} eq false"

"{IsFolder} eq false"

请注意,此操作的默认输出包括名为"{IsFolder}"的属性.我希望将其用作过滤条件:

Note that the default output of this operation includes a property named "{IsFolder}" which I was hopping it could be used as filter criteria:

{
已修改":"2018-12-03T16:21:09Z",
已创建":" 2018-09-07T18:14:28Z" ;,
"{Identifier}":联系人",
"{IsFolder}":正确,
"{Link}":"https://test.sharepoint.com/sites/test/1212D7436874E51180C90050568523A2",
"{Name}":"1212D7436874E51180C90050568523A2",
"{FilenameWithExtension}":"1212D7436874E51180C90050568523A2",
"{Path}":"test/"
}

{
"Modified": "2018-12-03T16:21:09Z",
"Created": "2018-09-07T18:14:28Z",
"{Identifier}": "contact",
"{IsFolder}": true,
"{Link}": "https://test.sharepoint.com/sites/test/1212D7436874E51180C90050568523A2",
"{Name}": "1212D7436874E51180C90050568523A2",
"{FilenameWithExtension}": "1212D7436874E51180C90050568523A2",
"{Path}": "test/"
}

我可以将Modified属性用作过滤器,而不会出现任何问题,例如:

I can use the Modified property as filter without any issues, for example:

"修改后的gt'@ {addHours(utcNow(),-48)}'''

"Modified gt '@{addHours(utcNow(), -48)}'"

截至目前,我已经尝试使用不同的定界符,强制转换等,但似乎无济于事.

As of right now I have tried using different delimiters, casting, etc, but nothing seems to work.

任何想法/建议将不胜感激.

Any idea/suggestion would be greatly appreciated.

推荐答案

你好 Javier 卡里科

Hello Javier Callico

基于几个线程  在这里

Based on couple of threads  here and here, it seems that {isFolder} isn't supported in the OData filtering. Assuming that is the case, it also appears that you can use "isFolder" property exposed from the Sharepoint REST API. When i implemented a quick test, following did the trick for me for distinguishing between folders vs files:

希望这会有所帮助:)


这篇关于在SharePoint连接器上使用筛选器查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆