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

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 Resident Rockstar
Resident Rockstar

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

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