--- title: "Not rule" slug: "core-not-rule" updated: 2026-04-02T14:03:44Z published: 2026-04-02T14:03:44Z canonical: "docs.lobstersoftware.com/core-not-rule" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # Not rule > [!NOTE] > Rule types – Abstract > > The negation of a rule (also [Junction](/v1/docs/en/core-rule-junction)) by a [Not rule](/v1/docs/en/core-not-rule) can be initiated via the **not** function in the context menu for the rule. ![images/download/attachments/201665741/image-2025-3-28_13-57-39-version-1-modificationdate-1743166659141-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-3-28_13-57-39-version-1-modificationdate-1743166659141-api-v2.png) Each *rule configuration* can be logically 'negated' – regardless of whether it is a single ‘rule’ or a complex combination of several [Rule types](/v1/docs/en/core-association-rule) in a [Junction](/v1/docs/en/core-rule-junction). This *negation* of a rule is achieved by executing the **not** function in the context menu (highlighted in green in the screenshot above) for the rule or [Junction](/v1/docs/en/core-rule-junction) to be negated. If there is not already a 'negation' for the selected position in the *rule configuration*, selecting the **not** function causes a [Not rule](/v1/docs/en/core-not-rule) to be 'inserted' at this position, which contains the previous rule or [Junction](/v1/docs/en/core-rule-junction). > [!WARNING] > **IMPORTANT:** To remove an existing negation, the **not** function must also be selected. The [Not rule](/v1/docs/en/core-not-rule) does not appear on the surface as an independent 'rule'. However, the 'negation' is indeed visualized: - If a rule is negated, an exclamation mark appears as a prefix in the header of the rule element (see table). - The graphic exclamation mark symbol at the bottom of the 'negated' element is much more distinctive (see table). | Negated [Variable rule](/v1/docs/en/core-storage-string-rule) (collapsed) | Negated [Variable rule](/v1/docs/en/core-storage-string-rule) (collapsed) | | --- | --- | | ![images/download/attachments/201665741/image-2025-3-28_13-58-51-version-1-modificationdate-1743166731410-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-3-28_13-58-51-version-1-modificationdate-1743166731410-api-v2.png) | ![images/download/attachments/201665741/image-2025-3-28_13-59-8-version-1-modificationdate-1743166748701-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-3-28_13-59-8-version-1-modificationdate-1743166748701-api-v2.png) | - In the example, a [Variable rule](/v1/docs/en/core-storage-string-rule) is negated within a *rule configuration*, which checks whether a [Variable](/v1/docs/en/core-storage-value) with the name `DEFCON` exists and returns the value '1' as a *string image*. - Due to the negation, this rule is considered 'passed' in all cases that do not fulfill the condition 'DEFCON==1'. --- **NOTE:** The negation of the rule is not the same as checking whether the `DEFCON` [Variable](/v1/docs/en/core-storage-value) contains a value *other* than `1`. After all, the rule is passed even if the variable does not exist at all. | | **Negation of an OR** [Junction](/v1/docs/en/core-rule-junction) **within an AND** [Junction](/v1/docs/en/core-rule-junction) **(left: collapsed, right: expanded)** | | This example shows the appearance of a 'negation' within a somewhat more complex logical aggregate. With a negated OR [Junction](/v1/docs/en/core-rule-junction) within an AND [Junction](/v1/docs/en/core-rule-junction). ![images/download/attachments/201665741/image-2025-3-28_14-0-50-version-1-modificationdate-1743166850696-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-3-28_14-0-50-version-1-modificationdate-1743166850696-api-v2.png) | ![images/download/attachments/201665741/image-2025-3-28_14-1-18-version-1-modificationdate-1743166878740-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-3-28_14-1-18-version-1-modificationdate-1743166878740-api-v2.png) | | The negation here only affects the OR [Junction](/v1/docs/en/core-rule-junction) and not the superordinate AND [Junction](/v1/docs/en/core-rule-junction). - In order for the rule to be passed overall, a *reference object* of the `Aircraft` type (see [Check type](/v1/docs/en/core-check-type-rule) above) must be present in any case. - AND in addition, its `category` must NEITHER be 'GA (General Aviation)' NOR must the `DEFCON` [Variable](/v1/docs/en/core-storage-value) contain a value whose *string image* is '`1`'. | Even if the [Not rule](/v1/docs/en/core-not-rule) does not superficially appear as an independent element, a node (`core:NotRule`) appears in the XML image (here for the first simple example): | ![images/download/attachments/201665741/image-2025-3-28_13-59-8-version-1-modificationdate-1743166748701-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-3-28_13-59-8-version-1-modificationdate-1743166748701-api-v2.png) | The **Edit as XML** function in the context menu of a negated rule or [Junction](/v1/docs/en/core-rule-junction) shows how the inner rule is embedded in the [Not rule](/v1/docs/en/core-not-rule). ![images/download/attachments/201665741/image-2025-3-28_14-4-39-version-1-modificationdate-1743167080012-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-3-28_14-4-39-version-1-modificationdate-1743167080012-api-v2.png) | XML image ```xml DEFCON 1 ``` | | --- | --- | --- |