Table.Contains
Table.Contains(table as table, row as record, optional equationCriteria as any) as logical
Angir om den angitte posten vises row
som en rad i table
. En valgfri parameter equationCriteria
kan angis for å kontrollere sammenligningen mellom radene i tabellen.
Fastslå om tabellen inneholder raden.
Bruk
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"]
)
Utdata
true
Fastslå om tabellen inneholder raden.
Bruk
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"]
)
Utdata
false
Fastslå om tabellen inneholder raden som bare sammenligner kolonnen [Navn].
Bruk
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"
)
Utdata
true