Evaluating two date fields

Well OK, this is also a PanX question but I’m working in Pan6 for this one - How can I tweak the procedure below to include… if the DestroyDate field is also empty, then it is ok to enter a ReviewHoldDate when editing that field -BUT- if the Destroy date already has an entry, for example… 07/15/16 - the user can’t enter a ReviewHoldDate later than the 07/15/16 DestroyDate, but can enter a ReviewHoldDate before the 07/15/16 date?

if «ReviewHoldDate» > «DestroyDate»
Field «ReviewHoldDate»
ClearCell
Beep Message “The Archive Review Hold Date can not be after the Destroy Date!” stop
endif

The procedure above works if the DestroyDate field already has an entry, but if that field is empty - it of course triggers my message and clears the ReviewHoldDate field.

Change the first line to

if «ReviewHoldDate» > «DestroyDate» and «DestroyDate» > 0

Dave

Oh… so simple, I had one of my users enter a bunch of Hold dates after the records were Destroyed - so this error trap solves that. Thanks so much Dave for the quick response!

Is there a way to disable the propagate feature for a particular field? What I “think” happened is that someone accidentally clicked the “ReviewHoldDate” field… and propagated.

You could use live menus, so that it isn’t on the menu, or use custom mode, and use buttons on the form to provide them with the tools you want them to have.

Dave

Thanks for the menu tips Dave… the procedure below works fine in Pan6, in PanX… it works… but the TEO for the «ReviewHoldDate» continues to blink, even when I click in another TEO/field??

Field «Archival Code»
If «Archival Code» = “I” or «Archival Code» = "O"
Else
Field «ReviewHoldDate»
ClearCell
Beep Message “You cannot enter an Archive Hold Date if the record series does not have Archival Status!” stop
EndIf

if «ReviewHoldDate» > «DestroyDate» and «DestroyDate» > 0
Field «ReviewHoldDate»
ClearCell
Beep Message “The Archive Hold Date can not be after the Destroy Date!” stop
endif