there is at least one (object)

この構成体は、現在のデータ・セット内に特定のタイプのオブジェクトが少なくとも 1 つ存在するかどうかをテストします。

目的

この構成体を使用して、現在のデータ・セットまたは指定コレクションに、特定のオブジェクトが少なくとも 1 つ含まれているかどうかを判別します。

構文

there is at least one <object> [in <list>] [where <test>,*]

説明

オプションの「in」節は、特定のオブジェクト・コレクションにテストを適用する場合に使用します。1 つ以上の条件を使用してカウント対象のオブジェクトをフィルターに掛ける場合は、1 つ以上のオプションの「where」節を使用します。

この構成体は、ルールの「if」部分でのみ使用できます。

以下の条件は、「Customer」オブジェクトが存在するかどうかをテストします。

if
    there is at least one customer 
        where...
then...

以下の条件は、シニア・ゴールド顧客が存在するかどうかをテストします。

definitions
  set ‘gold customers’ to all customers
      where the category of each customer is Gold;
if
   there is at least one customer in ‘gold customers’
        where the age of this customer is at least 60,
then...