Table.HasColumns
Table.HasColumns(table as table, columns as any) as logical
Indique si la table
contient la ou les colonnes spécifiées, columns
. Retourne true
si la table contient la ou les colonnes ; sinon, false
.
Déterminez si la table contient la colonne [Name].
Utilisation
TTable.HasColumns(
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"],
[CustomerID = 4, Name = "Ringo", Phone = "232-1550"]
}),
"Name"
)
Sortie
true
Déterminez si la table contient les colonnes [Name] et [PhoneNumber].
Utilisation
Table.HasColumns(
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"],
[CustomerID = 4, Name = "Ringo", Phone = "232-1550"]
}),
{"Name", "PhoneNumber"}
)
Sortie
false