Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Use Seach in conjuction with Filter

(0) ShareShare
ReportReport
Posted on by 252

Hi All,

 

Currently I am using the following to filter a Datatable, Filter('Tbl',DESCRIPTION=Combo_1.Selected.Value).

 

This works ok, but is there a way that I can use the functionality of Search, i.e. filtering the table as you type, but with no delegation issues?  Would I need to use a collection?

 

Thanks in Advance

 

  • Skybluekid Profile Picture
    Skybluekid 252 on at
    Re: Use Seach in conjuction with Filter

    Hi @cdwhite 

     

    Not quite what I was after. 

     

    I have Datatable, not Gallery, which has PO Number, Date, Description and supplier. Currently, I am using a collection in my combo box to search for the Description of a PO.  What I would like is to have the functionality of search, to search the description directly on the table.  But it would need to be delegable as my data source is over 2k lines.

  • Ami K Profile Picture
    Ami K 15,655 on at
    Re: Use Seach in conjuction with Filter

    @Skybluekid ,

     

    Regarding delegation, the answer depends on your data source. For SharePoint:

     

    StartsWith:

     

    The Search function is not a delegable function in SharePoint, but you could use the StartsWith function, which is delegable. The obvious drawback is that this function only returns matching values based off the start of the search text.

     

    Amik_0-1687170865102.png

     

     

    Filter(
     'Your Data',
     Len(Your Dropdown.Selected.Value) = 0 || 'Field 1' = Your Dropdown.Selected.Value,
     StartsWith(
     'Field 2',
     TextInput1.Text
     ) Or StartsWith(
     'Field 3',
     TextInput1.Text
     )
    )

     

     

    Filter

     

    The Filter function is delegable with SharePoint. If you can pre-filter your lists on a specific criteria that will return less than 2,000 rows, you can then perform a Search function on that smaller subset of data. For example we could have population data that has 5,000 rows of people per district, but if we know that each neighbourhood within those districts will return less than 2,000 rows, it is ok to use a non-delegable function within that smaller subset using delegable Filters.

     

    Dataverse

     

    Dataverse includes enhanced delegation for the IN operator.

     

     

    Filter(
     'Your Data',
     Len(Your Dropdown.Selected.Value) = 0 || 'Field 1' = Your Dropdown.Selected.Value,
     TextInput1.Text in 'Field 2' Or TextInput1.Text in 'Field 3'
    )

     

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

     

  • cdwhite Profile Picture
    cdwhite 1,067 on at
    Re: Use Seach in conjuction with Filter

    You should be able to do this. How are the current results being shown, in a gallery?

    If so, firstly, add a Text Input control to your app, this will act as your search box.

    You can then extend your existing Power Fx to include the Search function:

    Search(
    Filter('Tbl',DESCRIPTION=Combo_1.Selected.Value),
    TextInput.Text,
    "column1", "column2"...
    )

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard