英文:
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))
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论