RecordRef.IsEmpty() Method
Version: Available or changed with runtime version 1.0.
Determines whether any records exist in a filtered set of records in a table.
Syntax
Empty := RecordRef.IsEmpty()
Note
This method can be invoked using property access syntax.
Parameters
RecordRef
Type: RecordRef
An instance of the RecordRef data type.
Return Value
Empty
Type: Boolean
true if the record or table is empty; otherwise, false.
Remarks
If you have not applied filters to the record, this method determines whether the table is empty. If you have applied filters, the method determines whether the filtered set of records is empty.
The number of filters that you have applied to the records affects the speed of the IsEmpty method. The fewer the number of filters, the faster the operation is performed.
When you are using SQL Server, this method is faster than using the Count Method (Record) and then testing the result for zero.
This method works the same as the IsEmpty Method (Record).
Example
The following example opens table 18, the customer table as a RecordRef variable that is named. CustomerRecref. The IsEmpty Method (RecordRef) determines whether the table is empty. The message box displays false because the Customer table is not empty. false represents false.
var
CustomerRecref: RecordRef;
Text000: Label 'Is the table empty? %1.';
begin
CustomerRecref.Open(18);
IsEmpty := CustomerRecref.IsEmpty;
Message(Text000, IsEmpty);
end;
If you open table 78 (Printer Selection), the message will display true because the table is empty.
Related information
RecordRef Data Type
Get Started with AL
Developing Extensions