0

here I'm working on PowerApps I have 2 SharePoint lists one is challan list and one is challan details and I combine both in one gallery using the lookup function Eg: LookUp('Challan List',ID=ThisItem.CListID,Title) so for that I user multi filtering functionality, it used perfectly with combo box with pending challan and product name but now I want to search by challan list where i can search record by title and customer name my gallery item look like this for filtering. eg:

    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
)
  

so could you please tell me how to implement a filter gallery based on the search box using this code or another?enter image description here

Ashit Jadvani
  • 11
  • 1
  • 2

2 Answers2

0
Filter(
  MySource,
  StartsWith(
    CustomerColumn,
    Textfield.Value
  ) or
  StartsWith(
    Challan,
    TextField2.Value
  )
)
Iona Varga
  • 509
  • 2
  • 8
  • Thanks for the solution but i have a relational SharePoint list and I want to search from the relational list here you give me the solution that was already implemented. – Ashit Jadvani Feb 21 '22 at 05:42
0

Thanks for the solution but i have a relational SharePoint list and I want to search from the relational list here you give me the solution that was already implemented.

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
)

this is my previous code for multiple filters it works perfectly but it takes too much time to execute and gives me delegation error.

Peter Csala
  • 17,736
  • 16
  • 35
  • 75
Ashit Jadvani
  • 11
  • 1
  • 2
  • so could you please tell me how to implement a filter gallery based on the search box. where i can search record by title and customer name. That is exactly what was answered. You want to look up the values in your customer table/column/choice and use that to filter? – Iona Varga Feb 21 '22 at 09:20
  • but title and customer name is relational list you see in my above code where i can lookup the column , – Ashit Jadvani Feb 21 '22 at 11:59
  • So? Filter with your list values. That’s the answer and explained already. I don’t think your question is clear enough – Iona Varga Feb 22 '22 at 06:43