cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jaffacakes
New Member

Filter Gallery - with a Dataverse Table (View) + additional conditions

Hi Everyone

 

I am trying to filter in a gallery with a Dataverse (table view) with additional filtering conditions.

 

The code below ignores the Daily Customers view and returns all customers.  I am unable to do the filtering in the view as I am using 2 dropdowns on screen to apply the filters via the users chooses.  I have tried so many different things and cant find any examples anywhere.  Anyone able to assist?

Filter code I am using in Gallery.Items

Filter(

        'Customers',

        'Customers (Views)'.'Daily Customers',

         HairColourDropdown.SelectedText.Value = "All Genders" || HairColourFilterDropdown.SelectedText.Value = ‘HairColour Lookup'.’Name' ,

         HairTypeFilterDropDown.SelectedText.Value = "All HairTypes" ||  HairTypeFilterDropDown.SelectedText.Value = Text(‘HairType’)

)

 

 

4 REPLIES 4
Rivius
Resolver III
Resolver III

@jaffacakes Did you ever find a resolution to this? I'm having issues filtering on Dataverse table views as well 😞

Drrickryp
Super User
Super User

@jaffacakes

Try this formula:

With({dycust:Filter('Customers','Customers (Views)'.'Daily Customers')
     },
     Filter(dycust,Or(
                       HairColourDropdown.Selected.Value = "All Genders",
                       HairColourFilterDropdown.Selected.Value = ‘HairColour Lookup'.’Name'
                    ) &&
                     Or(
                        HairTypeFilterDropDown.Selected.Value = "All HairTypes",  
                        HairTypeFilterDropDown.Selected.Value = Text(‘HairType’)
                     )

)

 SelectedText has been deprecated and should be avoided.

Rivius
Resolver III
Resolver III

oh sweet thanks @Drrickryp ! The key for me was filtering the table and having the view as a filter criteria.  Rocking and rolling now!

Drrickryp
Super User
Super User

@Rivius 

If it answered your question, could you please mark it as solved so others can find it.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,368)