Power Apps排序过滤与搜索

huangapple go评论59阅读模式
英文:

Power Apps Sort Filter & Search

问题

我有一个问题,需要在我正在构建的Power App中组合一个函数。以下每个语句都可以单独正常工作。

SortByColumns(
If(Dropdown1.Selected.Status = "All", UAR_Access,
Filter(UAR_Access, Status = Dropdown1.Selected.Status)),
"LAST_x0020_NAME",
If(srtDescending,
Descending,
Ascending))

Search(UAR_Access, Search_Txt.Text,"LAST_x0020_NAME", "FIRST_x0020_NAME")

当我想将这两个语句应用于同一个画廊时,出现了问题。我确信这可以做到,我需要一些有关语法的帮助。提前感谢!

英文:

I am having an issue combining a function in a power app I am building. Each of the following statements work fine independently.

SortByColumns(
    If(Dropdown1.Selected.Status = "All", UAR_Access, 
        Filter(UAR_Access, Status = Dropdown1.Selected.Status)), 
   "LAST_x0020_NAME",
    If(srtDescending,
        Descending,
        Ascending))

and

Search(UAR_Access, Search_Txt.Text,"LAST_x0020_NAME", "FIRST_x0020_NAME")

My issue comes into play where I want to apply both statements to the same gallery. I am sure it can be done, I need some help with the syntax. Thanks in advance!

答案1

得分: 0

以下是您要翻译的内容:

Both Filter and Search functions take and return a table, so they can be combined such that the result of one can be used as the parameter to the other, like in the example below:

SortByColumns(
Search(
If(
Dropdown1.Selected.Status = "All",
UAR_Access,
Filter(UAR_Access, Status = Dropdown1.Selected.Status)),
Search_Txt.Text,
"LAST_x0020_NAME", "FIRST_x0020_NAME"),
"LAST_x0020_NAME",
If(srtDescending, SortOrder.Descending, SortOrder.Ascending))

英文:

Both Filter and Search functions take and return a table, so they can be combined such that the result of one can be used as the parameter to the other, like in the example below:

SortByColumns(
    Search(
        If(
            Dropdown1.Selected.Status = "All",
            UAR_Access,
            Filter(UAR_Access, Status = Dropdown1.Selected.Status)),
        Search_Txt.Text,
        "LAST_x0020_NAME", "FIRST_x0020_NAME"),
   "LAST_x0020_NAME",
    If(srtDescending, SortOrder.Descending, SortOrder.Ascending))

huangapple
  • 本文由 发表于 2023年2月14日 03:07:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/75440243.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定