用Combobox和文本的过滤PowerApp Browsegallery

发布于 2025-02-13 06:13:34 字数 576 浏览 0 评论 0原文

我有以下格式中的资产列表:

Site, IP Address, HostName, ...

列“站点”是一个组合。

我正在尝试构建一个允许用户逐场过滤的应用程序,并且仍然能够通过主机名或IP发短信搜索资产,

但我

SortByColumns(
If(CountRows(ComboBox1.SelectedItems)=0||IsBlank(ComboBox1.SelectedItems),Filter(
    [@'AssetList'], 
    (StartsWith('IP Address', TextSearchBox1.Text) || StartsWith(Hostname, TextSearchBox1.Text))
), Filter([@'AssetList'], Site in ComboBox1.SelectedItems.Value))
, "IP_x0020_Address", If(SortDescending1, Descending, Ascending)) 

只有在ComboBox中没有过滤时,它才能起作用。我如何实现过滤器和组合

I have a list of assets in the format as below:

Site, IP Address, HostName, ...

Column "site" is a ComboBox.

I am trying to build an app that allows users to filter by site, and still be able to text search asset by Hostname or IP

So far I have

SortByColumns(
If(CountRows(ComboBox1.SelectedItems)=0||IsBlank(ComboBox1.SelectedItems),Filter(
    [@'AssetList'], 
    (StartsWith('IP Address', TextSearchBox1.Text) || StartsWith(Hostname, TextSearchBox1.Text))
), Filter([@'AssetList'], Site in ComboBox1.SelectedItems.Value))
, "IP_x0020_Address", If(SortDescending1, Descending, Ascending)) 

But it only works if nothing is filtered in comboBox. How do I achieve both filter AND combobox

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

南…巷孤猫 2025-02-20 06:13:34
SortByColumns(
    If(
        CountRows(ComboBox1.SelectedItems)=0||IsBlank(ComboBox1.SelectedItems),
        Filter(
            [@'AssetList'], 
            (StartsWith('IP Address', TextSearchBox1.Text) || StartsWith(Hostname, TextSearchBox1.Text))
        ), 
        Filter(
            [@'AssetList'], 
            Site in ComboBox1.SelectedItems.Value,
            (StartsWith('IP Address', TextSearchBox1.Text) || StartsWith(Hostname, TextSearchBox1.Text))
        )
    ), 
    "IP_x0020_Address", 
    If(SortDescending1, Descending, Ascending)
) 

您只需要将搜索框添加到'combobox.selected项目= false'filter语句中

SortByColumns(
    If(
        CountRows(ComboBox1.SelectedItems)=0||IsBlank(ComboBox1.SelectedItems),
        Filter(
            [@'AssetList'], 
            (StartsWith('IP Address', TextSearchBox1.Text) || StartsWith(Hostname, TextSearchBox1.Text))
        ), 
        Filter(
            [@'AssetList'], 
            Site in ComboBox1.SelectedItems.Value,
            (StartsWith('IP Address', TextSearchBox1.Text) || StartsWith(Hostname, TextSearchBox1.Text))
        )
    ), 
    "IP_x0020_Address", 
    If(SortDescending1, Descending, Ascending)
) 

You just needed to add your search box StartsWith functions to your 'ComboBox.Selected items = false' filter statement

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文