Why use IsEmpty() ?

1 min read
Use isEmpty() for quick checks ,and FindSet() for loops.
IsEmpty() checks whether a record variable contains any data.It returns true if the table has no records.
Avoid using FindSet() if you don't plan to process the data — it's heavier than you think!
Syntax:
IF MyRecord.IsEmpty THEN
Message('No records found!');
You want to… | Use this |
Check if any record exists | IsEmpty() |
Loop through records efficiently | FindSet() |
Just get one record (e.g., the first) | FindFirst() |
Process locked set (transaction safe) | Find('-') or FindSet(true) |
0
Subscribe to my newsletter
Read articles from TURKI Hela directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
