Hello Appsheet Community,
I have table sites and table nurseLog. Each row in sites is related to many in nurseLog. nurseLog has a column visitDateTime. I am trying to add a virtual column to table sites that returns the most recent visitDateTime from related records in nurseLog. The column siteID in nurseLog is a ref to the key column UID in table sites.
To put contextually, we have nurses that input logs for their sites. I need to grab the date of the most recent log for each site.
Iโve tried using MAX() and MAXROW() but canโt quite get it to work. The below sorta works but returns the key column of table nurseLog instead of the visitDateTime
LIST(MAXROW(โnurseLogโ, โvisitDateTimeโ, ([siteID] = [UID])))
Any help would be much appreciated.
Solved! Go to Solution.
That worked when I wrapped it in a list(). Which your guide said but for some reason I was putting list() within MAX instead of outside.
LIST(MAX([Related nurseLogs][visitDateTime]))
Thank you as always, Steve!
User | Count |
---|---|
44 | |
34 | |
24 | |
23 | |
15 |