AnsweredAssumed Answered

Filter portal by time

Question asked by AnitaWoods on Jun 16, 2012
Latest reply on Jun 17, 2012 by raybaudi


Filter portal by time


I have the following calculation in a portal filter that shows related records from the LaborEntry table.  Birth and LaborEntry tables are related by ContactID.

(LaborEntry::Date & LaborEntry::Time) < (Birth::DOB_baby & Birth::Birthtime)

I only want records in the portal where LaborEntry::Date and LaborEntry::Time are before Birth::DOB_baby & Birth::Birthtime. If the baby is born at 11:06pm, and there is a LaborEntry record at 11:06pm, I want that entry to appear, but an entry at 11:07pm to not. At present, it will not show a LaborEntry at 11:06pm, but still shows one at 11:35pm, but nothing after midnight (thus, the next day).  I have an inverse portal on another tab of the same layout that has the inverse:

(LaborEntry::Date & LaborEntry::Time) > (Birth::DOB_baby & Birth::Birthtime)

That one appears to only be showing records that occur after the day, but doesn't show anything the same day as the birthdate but a later time.  IOW, it will show a record at 12:05am the next day, but won't show something at 11:55pm the same day as the birth.  

I'm not sure where the calculation for the filter is wrong that it sorta works and sorta doesn't.