0

在这里我正在研究 PowerApps 我有 2 个 SharePoint 列表,一个是 challan 列表,一个是 challan 详细信息,我使用查找功能将两者结合在一个库中 例如: LookUp('Challan List',ID=ThisItem.CListID,Title) 因此,我使用多重过滤功能,它与组合框完美搭配待处理的 challan 和产品名称,但现在我想按 challan 列表搜索,我可以按标题和客户名称搜索记录我的画廊项目看起来像这样进行过滤。 例如:

    If(
  //this is for all and all
        ComboBox2.Selected.Result = "All" And DisplayDD.Selected.Value = "All",
        'Challan Details',
    //this is for all product and selected challan status
        ComboBox2.Selected.Result = "All" And DisplayDD.Selected.Value <> "All",
        Filter(
           'Challan Details',
            DisplayDD.SelectedText.Value = "Pending" in Text(IsBlank(Remarks))
        ),
    //this is for selected product and all challan status
        ComboBox2.Selected.Result <> "All" And DisplayDD.Selected.Value = "All",
        Filter(
            'Challan Details',
            Title = ComboBox2.Selected.Result
        ),
    //this is for selected product and selected challan status
        ComboBox2.Selected.Result <> "All" And DisplayDD.Selected.Value <> "All",
        Filter(
            'Challan Details',
            Title = ComboBox2.Selected.Result & DisplayDD.SelectedText.Value = "Pending" in Text(IsBlank(Remarks))
    //this for searchbox 
        )),
    "Created",
    Descending
)
  

那么您能否告诉我如何使用此代码或其他代码实现基于搜索框的过滤器库?在此处输入图像描述

4

2 回答 2

0

感谢您的解决方案,但我有一个关系 SharePoint 列表,我想从这里的关系列表中搜索您给我已经实施的解决方案。

SortByColumns(
    Filter(
        Filter(
            'Challan Details',
            IsBlank(ComboBox2.SelectedItems) || IsEmpty(ComboBox2.SelectedItems) || Title in ComboBox2.SelectedItems.Title
        ),
        SearchChallan.Text in LookUp(
            'Challan List',
            ID = CListID,
            Title & CustomerName
        ),
        DisplayDD.SelectedText.Value = "Pending" in Text(IsBlank(Remarks)),
        DisplayDD.SelectedText.Value = "Completed" in Text(!IsBlank(Remarks))
    ),
    "Created",
    Descending
)

这是我之前用于多个过滤器的代码,它运行良好,但执行时间过长,并且给了我委派错误。

于 2022-02-21T05:45:44.993 回答
0
Filter(
  MySource,
  StartsWith(
    CustomerColumn,
    Textfield.Value
  ) or
  StartsWith(
    Challan,
    TextField2.Value
  )
)
于 2022-02-20T01:41:50.147 回答