You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

SharePoint项目:如何整合下拉筛选与文本搜索功能

整合下拉筛选与文本搜索的Power Apps公式

整合后的完整公式(带排序)

SortByColumns(
    Filter(
        Möbler;
        // 文本搜索:标题匹配搜索框前缀
        StartsWith(Title; TextSearchBox1.Text);
        // 分类下拉筛选:未选择则不限制,选中则匹配值
        IsBlank(DropdownKategori.Selected) || Kategori.Value = DropdownKategori.Selected.Value;
        // 子分类下拉筛选:未选择则不限制,选中则匹配值
        IsBlank(DropdownSubKategori.Selected) || SubKategori.Value = DropdownSubKategori.Selected.Value;
        // 颜色下拉筛选:未选择则不限制,选中则匹配值
        IsBlank(DropdownColor.Selected) || Color.Value = DropdownColor.Selected.Value;
        // 固定条件:仅显示未被预订的物品
        Bokad.Value = "Nej"
    );
    "Title";
    If(SortDescending1; SortOrder.Descending; SortOrder.Ascending)
)

简化版整合公式(不带排序)

Filter(
    Möbler;
    StartsWith(Title; TextSearchBox1.Text);
    IsBlank(DropdownKategori.Selected) || Kategori.Value = DropdownKategori.Selected.Value;
    IsBlank(DropdownSubKategori.Selected) || SubKategori.Value = DropdownSubKategori.Selected.Value;
    IsBlank(DropdownColor.Selected) || Color.Value = DropdownColor.Selected.Value;
    Bokad.Value = "Nej"
)

逻辑说明

  • 文本搜索:通过StartsWith(Title; TextSearchBox1.Text)实现标题前缀匹配,搜索框为空时自动返回所有数据。
  • 下拉筛选:每个下拉框采用IsBlank(下拉控件.Selected) || 字段值 = 下拉选中值逻辑——未选择时不筛选,选中后仅保留匹配项。
  • 固定条件:Bokad.Value = "Nej"始终生效,确保只显示未被预订的物品。
  • 排序功能:外层SortByColumns根据SortDescending1的布尔值,控制标题的升序/降序排列。

内容的提问来源于stack exchange,提问作者Jonas

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.27 23:03:14