cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dmac73
Level: Powered On

Gallery display inspections that have not been completed this month

I have two SharePoint Lists. One to many relationship. FireExtinguisherInfo (FEI) has an entry for each Fire Extinguisher. FireExtinguisherInspections (FEIN) has the multiple inspections for each extinguisher. I need a gallery to display FEI's that do NOT have an entry in FEIN's InspectionDate for the current month/year. The InspectionDate display's the date list this way mm/dd/yyyy.

 

This what I would like to happen:

Open screen and on that screen will be a dropdown with only the months available (if they want to search for previous months). The screen gallery will default to the current month/year and display the FEI's that do not have an entry in FEIN for this month/year.

 

 
1 REPLY 1
EricLott
Level 10

Re: Gallery display inspections that have not been completed this month

How is the data stored in your data source for the last inspection? Is it one column for year and one column for Month or is it a date in one column?

For one column each, it would look something like this:

 

Filter(YourDataSource,InspectionYear<>Year(Today()),InspectionMonth<=Month(Today()))

 

(**The above code will show inspections that took place the current month of the last year, if you want to filter those out as well change the <= in the month argument to <>)

 

If it's just a date type, you could do this:

 

Filter(YourDataSource,InspectionDate>DateAdd(Today(),-1,Years))

 

 

 

Helpful resources

Announcements
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,121)