cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
burliad
Helper III
Helper III

Filter Browse Gallery by empty/blank dates

Hi All,

 

Trying to filter my browse gallery by dates that are empty/blank.  The data source is from a sharepoint list.  I would like the list to show only the records with blank dates in the "treatEnd_dt" field.

 

Here is what i have tried along with a few variations of this.

SortByColumns(Filter([@tbl_treats], IsBlank(tbl_treats.treatEnd_dt), StartsWith(Title, TextSearchBox2.Text)), "Title", If(SortDescending1, Descending, Ascending)) 

 

List Name: tbl_treats

Field to sort by if blank: treatEnd_dt

Search box: TextSearchBox2

 

Thank you in advance...

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @burliad ,

Try this

SortByColumns(
   Filter(
      [@tbl_treats], 
      Value(treatEnd_dt)=0 &&
      StartsWith(
         Title, 
         TextSearchBox2.Text
      )
   ), 
   "Title", 
   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.

View solution in original post

7 REPLIES 7
WarrenBelz
Super User
Super User

Hi @burliad ,

Try this

SortByColumns(
   Filter(
      [@tbl_treats], 
      Value(treatEnd_dt)=0 &&
      StartsWith(
         Title, 
         TextSearchBox2.Text
      )
   ), 
   "Title", 
   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.

View solution in original post

This works perfectly!  Thank you so much!

I have added some new records and now it seems the filter is not working?  List is blank showing no records when it should show three

I removed the search box and went with this

Filter([@tbl_treats], Value(treatEnd_dt)=0)

@burliad ,

Strange - that is the filter I use all the time. If there is a date there you could try something like

DateDiff(
   treatEnd_dt,
   Today(),
   Days
)>1000

or whatever figure excludes your oldest date.

Kinget97
Frequent Visitor

Hello!

 

Hoping you guys can help me tweak this code to filter the following to show items with blanks in a choice column titled 'Route Day' in my SharePoint list.

List: Compost House Client List 1

Choice Column: Route Day

 

I'd like the gallery in my app to only display Clients in the list who have not had the Route Day choice selected.

 

Here's what I've got so far:

 

SortByColumns(

Filter('Compost House Client List_1',

IsBlank('Compost House Client List_1'.'Route Day'),

StartsWith(Title, TextSearchBox2.Text)),"Route_x0020_Day",

If(SortDescending1, Descending, Ascending))

 

Do I have to have a Search Box to use this code? I don't necessarily need one for my purposes, but if it's needed to make this code work I can add. Help! 😞 @burliad @WarrenBelz 

@Kinget97 ,

This is an old closed post - can you please post a new thread for this.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

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.

Users online (1,209)