R
Raphael Frei
Guest
My company has a lot of codes using
But while learning more about Progress, several places recomends me to search with
By saying that I need to find the first value using a unique field, does it really make a difference between these two? Besides not needing to check if the field is available
The only issue that I found by using
Continue reading...
FIND FIRST
to get the first register (Searching on a UNIQUE Field).But while learning more about Progress, several places recomends me to search with
FOR FIRST
instead, by saying that FIND FIRST
may not be finding the first register with the same value.By saying that I need to find the first value using a unique field, does it really make a difference between these two? Besides not needing to check if the field is available
Code:
FOR FIRST file_path WHERE file_path.file_name = "ABCDEF" NO-LOCK:
// Do my thing
END.
Code:
FIND FIRST file_path WHERE file_path.file_name = "ABCDEF" NO-LOCK NO-ERROR.
IF AVAIL file_path THEN DO:
// Do my thing
END.
The only issue that I found by using
FOR FIRST
is not being to use IF NOT AVAIL
in case of no records are available.Continue reading...