cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

How to filter based on a previous gallery selection?

Hi all, 

 

I need some help with my syntax. Basically I'm trying to filter based on on a previous gallery selection as well as a table that needs to display the current records in the dataverse for that day as well as a text search box so the user can search.

 

Here is what i've tried : 

 

Filter(SortByColumns(Search('Daily Measurement' = 'GalleryHome.Selected.Home',TextSearchList_2.Text,"gs_name"), Daily Measurement (Views)'.'Today Active')

 

  

I am getting multiple errors with what im using above. I think my syntax is wrong and just need help correcting it so it filters everything properly. 

 

Kind regards and thank you in advance

1 ACCEPTED SOLUTION

Accepted Solutions

@Usernametwice23 ,

As I said, I was guessing your values as they were not clear from the post. Can you please advise

  • Your data source,
  • The list name
  • The field name in this list you are comparing with the gallery and the matching field in the gallery
  • The column name you want to sort on
  • The column name you want to search on and the control name to be searched with

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @Usernametwice23 ,

I am guessing your values a bit here, but the structure would be

Search(
   SortByColumns(
      Filter(
         'Daily Measurement (Views)'
         'Daily Measurement' = GalleryHome.Selected.Home
      ),
      "Today Active"
   ),
   TextSearchList_2.Text,
   "gs_name"
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @WarrenBelz , Thanks for that, I am getting 'the filter has invalid arguments'. 

 

I tried the below and it filters based on the table details I give it, but I just need to add -  'GalleryHome.Selected.Home' to it. 

Is there any way I could add the gallery into here - 

Filter(SortByColumns(Search('Daily Measurement',TextSearchList_2.Text,"gs_name"),"gs_daynumber",Ascending), 'Daily Measurement (Views)'.'Today Active')

Thanks for the help!

@Usernametwice23 ,

As I said, I was guessing your values as they were not clear from the post. Can you please advise

  • Your data source,
  • The list name
  • The field name in this list you are comparing with the gallery and the matching field in the gallery
  • The column name you want to sort on
  • The column name you want to search on and the control name to be searched with

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,344)