Returning the last date from another Table
I'm building a beekeeping database. I have a 'Colony Table' which is the parent table. I have an 'Inspection Form' which is a child composition table to the 'Colony Table.'
The inspection form has a date field 'Inspection Form'.Date and I want to return to the Colony Table the last date an inspection was performed on that specific colony. So far, I've only been able to return the last inspection date for all of the colonies which isn't helpful. I've been working with this code but it throws an error stating that the formula isn't allowed to modify data.
let LastDate := max((select 'Inspection Form').Date);
'Inspection Form'.Date := last(select 'Inspection Form'[Date = LastDate]).Date
1 reply
-
Never mind I figured it out now that I posted to the forum! I spent a few hours trying to figure this out only to realize I was looking at the wrong date which is why the answer wasn't working. I used max(inspection form.date).
Content aside
- 3 yrs agoLast active
- 1Replies
- 245Views