CONTAINS(コンテインズ) 関数は、2 つのテキスト文字列を比較し、検証ルールやワークフロールールで特定の文字や文字列を検索するために使用されます。例えば、コメントフィールド内に特定の単語が含まれているかを確認することができます。詳細は、「CONTAINS」および「数式の演算子と関数」(リンクを右クリックして新しいタブでリンクを開く) を参照してください。
1.テキストを検索します。
2.未知の文字列または文字が、定義されている文字列または文字のセットと一致するかどうかを確認します。
テキストの検索例。
CONTAINS(Comments__c,"BadWord")Returns TRUE if "BadWord" is found anywhere in Comments__c.
未知の文字列または文字の検索例。
CONTAINS("0123456789", TextField__c)Will return true for TextField__c values such as 1,2,9,01,789, or any other substring of "0123456789"
CONTAINS("0123456789", LEFT(TextField__c,1))数字 0 ~ 9 のみを照合するには、compare_text の長さが 1 である必要があります。この例の数式は、TextField__c の先頭文字が 0 ~ 9 の範囲内にあるかどうかをチェックします。
CONTAINS を使用して文字列を定義されているセットと比較する場合は、セットの要素の長さが比較する文字列の長さと一致する必要があります。それでも、区切り文字と一致する可能性もあります。同等の CASE ステートメントは長くなりますが、信頼性も高くなります。
注意: CONTAINS 関数は、空白値を True とみなします。要件を満たすには、CONTAINS に NOT(ISBLANK() も含めてください。CONTAINS で NOT を使用すると、空白値は認識されません。
000385300

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.