> For the complete documentation index, see [llms.txt](https://docs.openbrim.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openbrim.org/developers/paramml-developer-guide/logical-statements-and-test/iif-functions.md).

# "iif" Functions

**List of Logical Statements**

The following are logical statements that can be used within the expressions of **iif** parameters:

**.EQ.** → Equal to (==)

**.NE.** → Not equal to (!=)

**.LT.** → Less than (<)

**.LE.** → Less than or equal to (<=)

**.GT.** → Greater than (>)

**.GE.** → Greater than or equal to (>=)

**.AND.** → AND (&&)

**.OR.** → OR (||)

**.NOT.** → NOT (!)

**Example:**

```xml
<O N="iifobject1" T="Project" Category="Logical Statement and Test" TransAlignRule="Right">
    <!-- created by ParamML Examples on 09.02.2023 -->
    <P N="a" V="3" />
    <P N="b" V="-40" />
    <P N="c" V="-25" />
    <P N="d" V="-30" />
    <P N="e" V="80" />
    <O N="iffexample" T="DesignCode">
        <P N="Test1" V="iif(a .GE. b,c,d)" />
        <P N="Test2" V="iif(a .EQ. 1,b, a .EQ. 2,c,a .EQ. 3,d,a .EQ. 4,e)" />
    </O>
</O>
```

![](https://openbrim.atlassian.net/wiki/download/attachments/2165506081/image-20230209-144030.png?api=v2) In the example provided, if the value of "a" is greater than "b", then the result of "Test1" will be "c". If not, the result will be "d".

In "Test2", a nested "iif" function is utilized to handle more complex tests. If the value of "a" is equal to 1, the result will be "b". If "a" is equal to 2, the result will be "c". If "a" is equal to 3, the result will be "d". And, if "a" is equal to 4, the result will be "e". To view this example in the library, see (<https://openbrim.org/platform/?application=inc&author=ParamML_Examples_OpenBrIM+Platform&folder=Logical+Statement+and+Test&obj=objidiks1ubk6utmhxl8k59dx4f>)

**Example:**

```xml
<O N="Calculation1" T="Group">
        <!-- .GE. → Greater than or equal to (>=) -->
        <P N="Len" V="3000" D="Length of ground" Role="Input" Category="Calculation1" />
        <P N="dynamic_effect" V="1+15/(Len/1000+37)" D="Dynamic effect Index" />
        <P N="Usedynamic_effect" V="iif(dynamic_effect .GE. 1.3, 1.3, dynamic_effect)" />
    </O>
```

The dynamic effect coefficient is determined using a formula. If the calculated value is greater than or equal to 1.3, it is set to 1.3. If it is less, the calculated value is used. This is presented as follows: ![](https://openbrim.atlassian.net/wiki/download/attachments/2165506081/image-20230209-155102.png?api=v2)

```xml
<O N="Calculation2" T="Group">
        <!-- .AND. → AND (&&) example -->
        <P N="A" V="22" />
        <P N="B" V="20" />
        <P N="C" V="12" />
        <P N="C1" V="iif(A .LT. B .AND. B .GT.C,C,9)" />
    </O>
```

.AND. In this expression, both the conditions on the left and right must be satisfied in order for the positive value to be accepted.

The value at which C1 will occur will be 9, as the condition A\<B is not provided, but B>C is provided. However, if both conditions are not met simultaneously, C1 will be assigned a negative value. In this case, C1=9. ![](https://openbrim.atlassian.net/wiki/download/attachments/2165506081/image-20230209-155339.png?api=v2)

```xml
<O N="Calculation3" T="Group">
        <!-- .OR. → OR (\|) example-->
        <P N="A" V="22" />
        <P N="B" V="20" />
        <P N="C" V="12" />
        <P N="C1" V="iif(A .LT. B .OR. B .GT.C,C,9)" />
    </O>
```

.OR. A positive value is accepted if one of the two conditions is met in the statement.

The value at which C1 will occur will be 12 because A\<B equality is not provided, B>C is provided. If only one of these two conditions is true, the result leads to a positive value. C1 takes the positive value and becomes C1=C. So C=12. ![](https://openbrim.atlassian.net/wiki/download/attachments/2165506081/image-20230209-155444.png?api=v2)

```xml
<O N="Calculation4" T="Group">
        <!-- .EQ. NULL example -->
        <P N="A" V="NULL" />
        <P N="B" V="NULL" />
        <P N="C" V="12" />
        <P N="D" V="35" />
        <P N="E" V="50" />
        <P N="C1" V="iif(A .EQ. B .AND. A .EQ. NULL,E,15)" />
    </O>
```

.EQ. The NULL expression searches for the absence of an object.

C1=E. So C1=50 . ![](https://openbrim.atlassian.net/wiki/download/attachments/2165506081/image-20230209-155827.png?api=v2) To view this example in the library, see (<https://openbrim.org/platform/?application=inc&author=ParamML_Examples_OpenBrIM+Platform&folder=Logical+Statement+and+Test&obj=objid1gymiqj4il4qsujbia5hbf>)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.openbrim.org/developers/paramml-developer-guide/logical-statements-and-test/iif-functions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
