cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JazzyN20
Frequent Visitor

Display an icon in gallery if the newest 'Created date' in a list is greater than 7 days

The idea here is to display an icon/shape/object in a gallery if the newest list items created date is older than 7 days.

I have attempted doing this thus far by using the objects visible property and a gallery.selected.created date which works until the gallery is interacted.

 

I am guessing there may be a way of simpy looking up the list an not needing to have/use a gallery.

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @JazzyN20 ,

 

You could try:

First(Sort(YourSPList,Created,Descending)).Created

 

Best Regards,

Bof

View solution in original post

4 REPLIES 4
RandyHayes
Super User
Super User

@JazzyN20 

If this is an icon in the gallery, then just set the Visible property to:

  (DateDiff(Today(), ThisItem.Created) > 7)

 

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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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 Randy

the icon is in a gallery where the source is a simple collection. The created date I need to use is on a SharePoint list and has nothing to do with the gallery where the icon is so I cannot use this.item.created date. Need to lookup the list somehow

v-bofeng-msft
Community Support
Community Support

Hi @JazzyN20 ,

 

You could try:

First(Sort(YourSPList,Created,Descending)).Created

 

Best Regards,

Bof

@JazzyN20 

So what then in the list is it that you want to look up?  You mentioned the newest item.  Is that what you are looking for?

 

_____________________________________________________________________________________
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

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

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 (5,109)