Udostępnij za pośrednictwem


Table.IsEmpty

Składnia

Table.IsEmpty(table as table) as logical 

Informacje

Wskazuje, czy zawiera table jakiekolwiek wiersze. Zwraca wartość true , jeśli nie ma wierszy (tj. tabela jest pusta), false w przeciwnym razie.

Przykład 1

Ustal, czy tabela jest pusta.

Użycie

Table.IsEmpty(
    Table.FromRecords({
        [CustomerID = 1, Name = "Bob", Phone = "123-4567"],
        [CustomerID = 2, Name = "Jim", Phone = "987-6543"],
        [CustomerID = 3, Name = "Paul", Phone = "543-7890"]
    })
)

Wyjście

false

Przykład 2

Ustal, czy tabela ({}) jest pusta.

Użycie

Table.IsEmpty(Table.FromRecords({}))

Wyjście

true