cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MSSAdmin
Helper I
Helper I

Hide gallery items with dates in the past?

Hi everyone,

I have a simple SharePoint list in PowerApps with the automatically generated BrowseScreen, EditScreen, DetailsScreen.

The view in my Browse Screen is an address and a date.

Is there any way I can hide or grey out items from this BrowseScreen that have a date in the past?

 

I do not want to delete the items completely but to avoid confusion with the person using it, they shouldn't appear once the date has passed.

 

Any help is appreciated, thank you.

2 ACCEPTED SOLUTIONS

Accepted Solutions
RandyHayes
Super User
Super User

@MSSAdmin 

Change that then to the following:

SortByColumns(
    Filter([@'Gear list'], 
        StartsWith(Title, TextSearchBox1.Text) &&
        Date>=Today()
    ), 
    "Title", 
    If(SortDescending1, Descending, Ascending)
)
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

@MSSAdmin ,

Just helping @RandyHayes here - he has answered your post adequately, but in relation to your second question

SortByColumns(
   Filter([@'Gear list'], 
      StartsWith(Title, TextSearchBox1.Text) &&     
      (
         Date>=Today()||
         Value(Date)=0
      )
   ), 
   "Title", 
   If(SortDescending1, Descending, Ascending)
)

 

 

 

 

View solution in original post

10 REPLIES 10
RandyHayes
Super User
Super User

@MSSAdmin 

Set the Items property of your Gallery to the following formula:

   Filter(yourDataSource, Date>=Today())

This will only show items with dates from today on.  Change the yourDataSource to the name of you SharePoint list and this should give you what you want.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi, 

thanks for the quick response. However, I either don't know where to add the formula or it doesn't work.

This is the code currently in the Items property:

SortByColumns(Filter([@'Gear list'], StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))

RandyHayes
Super User
Super User

@MSSAdmin 

Change that then to the following:

SortByColumns(
    Filter([@'Gear list'], 
        StartsWith(Title, TextSearchBox1.Text) &&
        Date>=Today()
    ), 
    "Title", 
    If(SortDescending1, Descending, Ascending)
)
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Screen Shot 2020-11-25 at 1.39.42 pm.png

This is the error message I get.

RandyHayes
Super User
Super User

@MSSAdmin 

You need to replace the Date in that formula with whatever the name of your date column is that you want to filter against.  You did not mention the name of the column in your original post.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Got it, that works! Thank you 😃

However, is there a way to show the entries that don't have a date at all? Some of them don't so the date is added later and the entries have to be visible.

MSSAdmin
Helper I
Helper I

Any updates on my previous post?

@MSSAdmin ,

Just helping @RandyHayes here - he has answered your post adequately, but in relation to your second question

SortByColumns(
   Filter([@'Gear list'], 
      StartsWith(Title, TextSearchBox1.Text) &&     
      (
         Date>=Today()||
         Value(Date)=0
      )
   ), 
   "Title", 
   If(SortDescending1, Descending, Ascending)
)

 

 

 

 

View solution in original post

RandyHayes
Super User
Super User

Thanks for jumping in @WarrenBelz  I've been way behind on catching up with replies to posts 😕

 

@MSSAdmin give Warren's formula a shot, just again...don't forget to replace Date with whatever the name of your actual data column is.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

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 (2,439)