Hi Guys,
I'm hoping someone can help me because i'm stuck on this issue and chat gpt has not been too helpful so I need some real help 😉
I have two tables, Maintenances which lists all maintenance checks for a car. The second table is MaintenanceChecks which contains all checks performed by staff.
I have a gallery control on our mobile app and I want it to only show maintenances entries where there is no maintenance check performed within a specified timeframe.
I have this in the items function box:
Filter(Maintenances, ID in Filter(MaintenanceChecks, CheckDate <= DateAdd(Now(),FrequencyInDays-(FrequencyInDays*2),TimeUnit.Days)).MaintenanceID)
I need to modify the inner filter to only return the latest entries because it evaluates older checks when I only want the latest check.
Filter(MaintenanceChecks, CheckDate <= DateAdd(Now(),FrequencyInDays-(FrequencyInDays*2),TimeUnit.Days)).MaintenanceID
The issue is that the 'check tyres' entry in maintenances shows in the gallery even if someone checked the tyres today because its evaluating dates on older entries too.
If you understand this and can help please do!
Thanks.