cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RaphaelAlves
Regular Visitor

How to filter in a default galley

Hi People,

 

I have a galley with the following code. I need to apply a filter to show only the items with Status "Yes". The Status is a colunm in the Event table. I tried many things, but I'm not getting. I'm getting crazing... It looks so simple, but I'm not finthe way to do that. 😞


SortByColumns(Filter([@Events], StartsWith(Title, TextSearchBox1.Text)||StartsWith(Organizer, TextSearchBox1.Text)), "EventDate", If(SortDescending1, Descending, Ascending))

1 ACCEPTED SOLUTION

Accepted Solutions

@RaphaelAlves ,'

I was simply using the values you gave me - by "yes", I assumed this was a text field, however it appears you have a Boolean (true/false yes/no) field. Note - you will get a Delegation warning on this as Boolean fields are not Delegable.

SortByColumns(
   Filter(
      Events, 
      Status = true &&
      (
         StartsWith(
            Title, 
            TextSearchBox1.Text
         ) ||
         StartsWith(
            Organizer, 
            TextSearchBox1.Text
         )
      )
   ), 
   "EventDate", 
   If(
      SortDescending1, 
	  Descending, 
	  Ascending
   )
)

How many records are in your list?

 

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.

View solution in original post

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @RaphaelAlves ,

Something like this

SortByColumns(
   Filter(
      Events, 
      Status = "Yes" &&
      (
         StartsWith(
            Title, 
            TextSearchBox1.Text
         ) ||
         StartsWith(
            Organizer, 
            TextSearchBox1.Text
         )
      )
   ), 
   "EventDate", 
   If(
      SortDescending1, 
	  Descending, 
	  Ascending
   )
)

 

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.

It's returning a invalid argument in the code Status = "Yes"

@RaphaelAlves ,'

I was simply using the values you gave me - by "yes", I assumed this was a text field, however it appears you have a Boolean (true/false yes/no) field. Note - you will get a Delegation warning on this as Boolean fields are not Delegable.

SortByColumns(
   Filter(
      Events, 
      Status = true &&
      (
         StartsWith(
            Title, 
            TextSearchBox1.Text
         ) ||
         StartsWith(
            Organizer, 
            TextSearchBox1.Text
         )
      )
   ), 
   "EventDate", 
   If(
      SortDescending1, 
	  Descending, 
	  Ascending
   )
)

How many records are in your list?

 

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.

View solution in original post

Hi @RaphaelAlves ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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