PowerApps Gallery如何同时保留Search功能并新增Filter筛选逻辑
Power Apps Gallery 搜索+筛选合并公式
最终合并公式
推荐将筛选逻辑前置,先过滤出当前用户可见的条目再执行搜索,运行效率更高:Search(Filter('Incident Report', Lower('Notified Users'.Email) = Lower(User().Email)), TextInputSearchBox.Text, "Title")
也可以将搜索前置再做筛选,运行结果完全一致:Filter(Search('Incident Report', TextInputSearchBox.Text, "Title"), Lower('Notified Users'.Email) = Lower(User().Email))
SharePoint 数据源适配调整
- 如果
Notified Users是允许多选的人员字段,需要将等于判断改为in运算符,避免匹配报错:Search(Filter('Incident Report', Lower(User().Email) in Lower('Notified Users'.Email)), TextInputSearchBox.Text, "Title") - 若能保证邮箱大小写完全统一,可删除
Lower()函数,提升查询的可委托性,避免大数据量下出现数据截断问题。 - 如需新增搜索字段,可在公式末尾的搜索字段参数列表中,直接追加双引号包裹的对应SharePoint列名即可。
内容的提问来源于stack exchange,提问作者Az Hughes-Jackson
相关产品推荐
相关产品推荐

