Powerapps 中是否有一个选项可以将搜索文本拆分为单独的字符串并仅在图库中显示包含 "all" 字符串的项目?

Is there an option in Powerapps to split a search text into individual strings and to display on a gallery only items that include "all" strings?

我的情况和这个情况类似:点击!

我有一个画廊,其中显示来自 Collection 的项目。我已经添加了 Textinput.Text 以便客户有机会搜索商品。

但是,我正在苦苦挣扎的是实现 "full-text" 搜索。

@carlosfigueira 在 above-mentioned 问题中提供的解决方案非常适合拆分搜索文本,但我希望在图库中仅显示包含所有单个字符串的项目。

这是我的画廊项目代码

Filter(
    CustomListIssues;
    Sum(
        ForAll(
            Filter(
                Split(
                    InpSearchString.Text;
                    " "
                );
                Len(Trim(Result)) > 0
            );
            If(
                Result in 'Title EN';
                1;
                0
            ) && "Unresolved" = Status && If(
                !IsEmpty(lbSearchDepartment.SelectedItems.Result);
                lbSearchDepartment.Selected.Value = Departement;
                "" in Departement
            )
        );
        Value
    ) > 0
)

CustomListIssues:我存储所有列表项的 collection

InpSearchString.Text:搜索TextInput.Text

'Title EN': 我想根据给定的搜索字符串搜索的列

概览应用程序:

下面的图片让您大致了解目前looks/works

  1. 给定的搜索字符串
  2. Trim(InpSearchString.Text)
  3. 画廊显示来自 Collection
  4. 的项目

预期结果:

我希望在图库中仅显示包含所有单独字符串的项目

提前致谢

萨沙·多尼格

如果你想要所有字符串而不是其中一个,你可以稍微改变表达式的逻辑。如果标题中有一个词,它会将 1 加起来,然后检查结果是否大于 0(因此,如果存在任何词,则该项目将被 returned)。在下面这个修改后的表达式中,如果标题中的每个单词 不是 ,我们就加 1,最后我们将总和与 0 进行比较 - 如果它不为零,则至少有一个找不到单词,我们没有 return 记录。

Filter(
    CustomListIssues;
    Sum(
        ForAll(
            Filter(
                Split(
                    InpSearchString.Text;
                    " "
                );
                Len(Trim(Result)) > 0
            );
            If(
                Result in 'Title EN';
                0;
                1
            ) && "Unresolved" = Status && If(
                !IsEmpty(lbSearchDepartment.SelectedItems.Result);
                lbSearchDepartment.Selected.Value = Departement;
                "" in Departement
            )
        );
        Value
    ) = 0
)