matches_filter
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
matches_filter
函式可用於自訂篩選器和自訂欄位,用來判斷欄位值是否符合篩選器運算式。
語法
matches_filter(field, filter expression
)
matches_filter
函式會將篩選運算式套用至欄位,如果欄位中的值與篩選運算式相符,則傳回 Yes
;如果不相符,則傳回 No
。
範例
如果月結單日期在 30 天內,這個範例會在自訂欄位中傳回 Yes
:
matches_filter(${billing.invoice_date}, `30 days`)
使用 if
函式搭配 matches_filter
,即可傳回不同的值。下方範例顯示自訂欄位的語法,如果帳單日期超過 30 天,就會傳回「Late」:
if(matches_filter(${billing.invoice_date}, `30 days`), "Current", "Late")
注意事項
定義篩選器運算式的字串必須加上反斜線 (`) 字元。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-05-30 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-05-30 (世界標準時間)。"],[],[]]