Michael,

Have an index on the Payments panel that sorts by a reverse date field so
that the most recent record is the first in the index. Link to the Payments
panel from the Contact panel using this index (can be a hidden or visible
link, doesn't matter).

Your 'past-due' flag field will be on the Contact panel, with a formula that
accesses the 'payment-to' field through the link. When it looks through the
link to get the 'payment-to' field value, it will always get the field from
the first record it links to, which should be your most recent record if you
set up the index right.

If you have to have the 'past-due' flag show up in the Payments panel, you
could do something similar using a recursive link from the Payments panel to
itself using the same index as above (but with no link-list so it links to
all records in the panel). If you only want the flag to appear on the most
recent record, you would need to make it a calculated field that would only
evaluate to a non-blank value if the currently displayed record matched the
first record through the link.

Tim Rude

----- Original Message ----- 
From: "Michael Iannantuoni" <[EMAIL PROTECTED]>
To: "Dataperfect Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, July 18, 2006 2:42 AM
Subject: [Dataperf] Checking overdue payments


> I'm setting up a database to keep records of payments of advertisers to
> our village magazine:
>
> I have a main "Contact" panel linked to a "Payments" panel where the
> fields include "Payment-from" and "Payment-to".
>
> We need to keep records of all previous payments so each advertiser will
> have a number of records in the "Payments" panel but I would also like
> to set up a system whereby overdue payments are flagged - something like
> "if today - Payment-to is greater than 0 then flag" but I'm not sure how
> to get this to operate on only the last payment record for each
advertiser.
>
> Any help, or different approach, much appreciated.
>
> Michael
>
> _______________________________________________
> Dataperf mailing list
> [email protected]
> http://lists.dataperfect.nl/mailman/listinfo/dataperf
>
_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf

Reply via email to