メイン コンテンツをスキップする

論理式

論理式で以下の演算子を使用できます:
  • &&またはandは "and"
  • ||またはorは "or"
  • !またはnotは "not"
情報メモ注: andorTalend Cloud Pipeline DesignerTalend Data Mapperでしかサポートされていません。

&&||という演算子は、リテラル値、識別子、ファンクション、式のいずれかの間で使用できます。式が代入式として解釈されうる場合は、括弧で囲む必要があります。たとえばstring1 = "Hello " && string2 = "World!"string1という識別子の代入式として解釈されます。有効な論理式は、(string1 = "Hello ") && (string2 = "World!")またはstring1 == "Hello " && string2 == "World!"のどちらかになります。

!notという演算子の後には、リテラル値、識別子またはファンクション、括弧で囲まれた式のいずれかが直接続きます。

以下の例は有効な論理式です:
customer.status.defined && customer.status.enabled
customer.birthday.defined || customer.age.defined
itemId == 1 and itemQuantity > 0
itemQuantity < 10 or itemPrice < 5
!customer.credentials.activated
!contains(customer.name, 'Dr')
!(customer.id == order.cust_id)
not(customer.id == order.cust_id)

このページは役に立ちましたか?

このページまたはコンテンツに、タイポ、ステップの省略、技術的エラーなどの問題が見つかった場合は、お知らせください。改善に役立たせていただきます。