cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nirvana_moksh
Level: Powered On

Filtering Gallery Option

Hey All,

 

Is there a way to have two filtering options in the Gallery? One which is govered by PowerBIIntegration and order by the Text Box Search. Below are the two that I am trying to merge into 1:

 

This sorts by the selection made in Power BI Data Table:

SortByColumns(Filter(Table1, ID in PowerBIIntegration.Data.ID), "Date", If(SortDescending1, Descending, Ascending))

 

 

This is by the Text Box Search Option:

SortByColumns(Filter(Table1, StartsWith(ID, TextSearchBox1.Text)), "Date", If(SortDescending1, Descending, Ascending))

 

 

Thank You

6 REPLIES 6
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Filtering Gallery Option

If you want to filter the items when BOTH conditions are true (AND):

SortByColumns(
    Filter(
        Table1,
        ID in PowerBIIntegration.Data.ID,
        StartsWith(ID, TextSearchBox1.Text)),
    "Date",
    If(SortDescending1, Descending, Ascending))

If you want to filter the items when ONE (or both) of the conditions is true (OR):

SortByColumns(
    Filter(
        Table1,
        ID in PowerBIIntegration.Data.ID Or StartsWith(ID, TextSearchBox1.Text)),
    "Date",
    If(SortDescending1, Descending, Ascending))
nirvana_moksh
Level: Powered On

Re: Filtering Gallery Option

So I tried this as an option but when using SharePoint List I dont think the in operator functions, is there a substiute for it like maybe Search?

PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Filtering Gallery Option

The 'in' operator works for SharePoint lists, but it may not support delegation. Depending on the size of your list it may not be a problem.

 

If the ID column is a string column, then Search could work as well, but it depends on the format of the values.

nirvana_moksh
Level: Powered On

Re: Filtering Gallery Option

Thanks a lot Carlos, your input was very helpful.

Highlighted
nirvana_moksh
Level: Powered On

Re: Filtering Gallery Option

Hey Carlos,

 

Just a follow up question on this that I had is that I still have a doubt of what delegation means in this regard of SharePoint? Is it the BrowseGallery that it can only pull 2000 records or is it for the function of 'in' operator that it cannot perform it on the App so it will perform it on SharePoint list?

 

 

Thank You

Community Support Team
Community Support Team

Re: Filtering Gallery Option

Read more about delegation here:

Understand Delegation

Delegable Data Sources

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.