Table.Contains
Table.Contains(table as table, row as record, optional equationCriteria as any) as logical
Indique si l’enregistrement spécifié, row
, s’affiche sous la forme d’une ligne dans table
. Vous pouvez spécifier un paramètre facultatif equationCriteria
pour contrôler la comparaison entre les lignes de la table.
Déterminer si la table contient la ligne.
Utilisation
Table.Contains(
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 = "Bob"]
)
Sortie
true
Déterminer si la table contient la ligne.
Utilisation
Table.Contains(
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 = "Ted"]
)
Sortie
false
Déterminer si la table contient la ligne en comparant seulement la colonne [Name].
Utilisation
Table.Contains(
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"]
}),
[CustomerID = 4, Name = "Bob"],
"Name"
)
Sortie
true