Consultor Eletrônico



Kbase 16342: VALIDATE with CAN-FIND looking for exactly 1 record
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
VALIDATE with CAN-FIND looking for exactly 1 record

CAN-FIND will return TRUE in ONLY one case -- that is if exactly one
record meets the criteria.

So for example, the message in the following case will be NO.

FIND FIRST customer.
MESSAGE CAN-FIND (order OF customer WHERE sales-rep = "HXM").

...even though there are 4 orders for customer 1, that all have "HXM"
as the sales-rep.

This can confuse people if they are using CAN-FIND in a VALIDATE
situation. Using FIRST or LAST as follows will return TRUE if one or
more records fits the criteria, and will probably resolve the issue.

FIND FIRST customer.
MESSAGE CAN-FIND (FIRST order OF customer WHERE sales-rep = "HXM").

Progress Software Technical Support Note # 16342