使用airtable api的filterByFormula方法我可以查询并选择包含一个特定项目(字符串)的记录。但是,此查询只返回只包含该特定字符串的记录。如何过滤包含给定字符串的airtable记录,但也可能包含其他记录?
在这里搜索airtable api公式文档: https://support.airtable.com/hc/en-us/articles/203255215-Formula-Field-Reference 不会得到答案。
我有什么:
base('Table').select({
view: 'Main View',
filterByFormula: `Column = "${myFilter}"`
}).firstPage(function(err, records) {
if (err) { console.error(err); reject(err); }
records.forEach(function(record) {
console.log(record.get('Another Column'));
});
这再次返回只有myFilter记录,并没有包含在给定列的任何额外值的记录。
编辑:airtable将这些列称为“多选”字段类型。
你不能在'> = 0'上使用'SEARCH'或'FIND'函数吗?像'\'SEARCH(“$ {myFilter}”,Column)> = 0 \''? – haxxxton
把它扔在答案中,我可以接受它。这工作,谢谢你! –