Table.ContainsAny
语法
Table.ContainsAny(table as table, rows as list, optional equationCriteria as any) as logical
关于
指示记录 rows
列表中的任何指定记录是否在 table
中显示为行。 可以指定一个可选参数 equationCriteria
以控制表中各行之间的比较。
示例 1
确定表 ({[a = 1, b = 2], [a = 3, b = 4]})
是否包含行 [a = 1, b = 2]
或 [a = 3, b = 5]
。
使用情况
Table.ContainsAny(
Table.FromRecords({
[a = 1, b = 2],
[a = 3, b = 4]
}),
{
[a = 1, b = 2],
[a = 3, b = 5]
}
)
输出
true
示例 2
确定表 ({[a = 1, b = 2], [a = 3, b = 4]})
是否包含行 [a = 1, b = 3]
或 [a = 3, b = 5]
。
使用情况
Table.ContainsAny(
Table.FromRecords({
[a = 1, b = 2],
[a = 3, b = 4]
}),
{
[a = 1, b = 3],
[a = 3, b = 5]
}
)
输出
false
示例 3
确定表 (Table.FromRecords({[a = 1, b = 2], [a = 3, b = 4]}))
是否包含只比较列 [a] 的行 [a = 1, b = 3]
或 [a = 3, b = 5]
。
使用情况
Table.ContainsAny(
Table.FromRecords({
[a = 1, b = 2],
[a = 3, b = 4]
}),
{
[a = 1, b = 3],
[a = 3, b = 5]
},
"a"
)
输出
true